mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-08-14 01:15:51 +08:00
### What problem does this PR solve? Fix: The requested interface timeout will cause the page to crash #4787 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
parent
b48c85dcf9
commit
5a51bdd824
@ -68,7 +68,7 @@ const errorHandler = (error: {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return response;
|
return response ?? { data: { code: 1999 } };
|
||||||
};
|
};
|
||||||
|
|
||||||
const request: RequestMethod = extend({
|
const request: RequestMethod = extend({
|
||||||
@ -98,7 +98,7 @@ request.interceptors.request.use((url: string, options: any) => {
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
request.interceptors.response.use(async (response: any, options) => {
|
request.interceptors.response.use(async (response: Response, options) => {
|
||||||
if (response?.status === 413 || response?.status === 504) {
|
if (response?.status === 413 || response?.status === 504) {
|
||||||
message.error(RetcodeMessage[response?.status as ResultCode]);
|
message.error(RetcodeMessage[response?.status as ResultCode]);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user