chore: display the error message of request header
This commit is contained in:
@@ -170,10 +170,11 @@ export const extractErrorMessage = (result: any) => {
|
||||
result?.data?.detail ||
|
||||
result?.data?.message ||
|
||||
result?.error?.message ||
|
||||
result?.error ||
|
||||
result?.detail ||
|
||||
result?.message ||
|
||||
result?.data;
|
||||
result?.data ||
|
||||
(result?.error === true ? 'Unknown error' : result?.error);
|
||||
|
||||
if (errorMsg) {
|
||||
return typeof errorMsg === 'string' ? errorMsg : JSON.stringify(errorMsg);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user