mirror of
https://github.com/HKUDS/LightRAG.git
synced 2025-08-01 13:21:54 +00:00
better error handing
This commit is contained in:
parent
7d6ffbbd87
commit
beee79d013
@ -81,7 +81,7 @@ export const checkHealth = async (): Promise<
|
|||||||
} catch (e) {
|
} catch (e) {
|
||||||
return {
|
return {
|
||||||
status: 'error',
|
status: 'error',
|
||||||
message: `${e}`
|
message: e instanceof Error ? e.message : `${e}`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,9 @@ const fetchGraph = async (label: string) => {
|
|||||||
try {
|
try {
|
||||||
rawData = await queryGraphs(label)
|
rawData = await queryGraphs(label)
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
useBackendState.getState().setErrorMessage(`${e}`, 'Query Graphs Error!')
|
useBackendState
|
||||||
|
.getState()
|
||||||
|
.setErrorMessage(e instanceof Error ? e.message : `${e}`, 'Query Graphs Error!')
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user