mirror of
https://github.com/HKUDS/LightRAG.git
synced 2025-07-30 20:31:52 +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) {
|
||||
return {
|
||||
status: 'error',
|
||||
message: `${e}`
|
||||
message: e instanceof Error ? e.message : `${e}`
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -53,7 +53,9 @@ const fetchGraph = async (label: string) => {
|
||||
try {
|
||||
rawData = await queryGraphs(label)
|
||||
} catch (e) {
|
||||
useBackendState.getState().setErrorMessage(`${e}`, 'Query Graphs Error!')
|
||||
useBackendState
|
||||
.getState()
|
||||
.setErrorMessage(e instanceof Error ? e.message : `${e}`, 'Query Graphs Error!')
|
||||
return null
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user