mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
### What problem does this PR solve? feat: catch errors when sending messages #918 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
import { Authorization } from '@/constants/authorization';
|
||||
import { ResponseType } from '@/interfaces/database/base';
|
||||
import i18n from '@/locales/config';
|
||||
import authorizationUtil, { getAuthorization } from '@/utils/authorizationUtil';
|
||||
import { message, notification } from 'antd';
|
||||
@ -42,12 +43,6 @@ type ResultCode =
|
||||
| 503
|
||||
| 504;
|
||||
|
||||
interface ResponseType {
|
||||
retcode: number;
|
||||
data: any;
|
||||
retmsg: string;
|
||||
status: number;
|
||||
}
|
||||
const errorHandler = (error: {
|
||||
response: Response;
|
||||
message: string;
|
||||
|
||||
Reference in New Issue
Block a user