feat: Catching errors with IndentedTree #2247 (#2380)

### What problem does this PR solve?

feat: Catching errors with IndentedTree #2247

### Type of change

- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2024-09-12 13:34:33 +08:00
committed by GitHub
parent 333608a1d4
commit 6000c3e304
6 changed files with 70 additions and 22 deletions

View File

@ -494,7 +494,7 @@ export const useFetchMindMap = () => {
mutationFn: async (params: IAskRequestBody) => {
try {
const ret = await chatService.getMindMap(params);
return ret?.data?.data ?? [];
return ret?.data?.data ?? {};
} catch (error) {
if (has(error, 'message')) {
message.error(error.message);