mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
Unified API response json schema (#3170)
### What problem does this PR solve? Unified API response json schema ### Type of change - [x] Refactoring
This commit is contained in:
@ -6,8 +6,8 @@ export const useCatchDocumentError = (url: string) => {
|
||||
|
||||
const fetchDocument = useCallback(async () => {
|
||||
const { data } = await axios.get(url);
|
||||
if (data.retcode !== 0) {
|
||||
setError(data?.retmsg);
|
||||
if (data.code !== 0) {
|
||||
setError(data?.message);
|
||||
}
|
||||
}, [url]);
|
||||
useEffect(() => {
|
||||
|
||||
Reference in New Issue
Block a user