mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-07-31 20:02:01 +08:00
chore: error message is updated (#1037)
This commit is contained in:
parent
284eda4072
commit
9f5241e82c
@ -21,10 +21,15 @@ export function ErrorResponseHandler(error: AxiosError): ErrorResponse {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const { errors, error } = data;
|
||||||
|
|
||||||
|
const errorMessage =
|
||||||
|
Array.isArray(errors) && errors.length >= 1 ? errors[0].msg : error;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
statusCode,
|
statusCode,
|
||||||
payload: null,
|
payload: null,
|
||||||
error: data.error,
|
error: errorMessage,
|
||||||
message: null,
|
message: null,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user