2
0

🚸 (nocodb) Clean up error messages

Closes #1568
This commit is contained in:
Baptiste Arnaud
2024-06-14 10:05:16 +02:00
parent ff16706d7d
commit 0f2f4d2130
4 changed files with 15 additions and 3 deletions

View File

@@ -0,0 +1,9 @@
export const parseErrorResponse = async (res: Response) => {
if (res.headers.get('content-type')?.includes('application/json')) {
const json = await res.json()
if ('msg' in json) return json.msg
return json
}
return res.text()
}