We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 45eadfc commit 59745afCopy full SHA for 59745af
site/src/api/errors.ts
@@ -61,12 +61,7 @@ export const mapApiErrorToFieldErrors = (
61
export const getErrorMessage = (
62
error: unknown,
63
defaultMessage: string,
64
-): string =>
65
- isApiError(error)
66
- ? error.response.data.message
67
- : error instanceof Error
68
- ? error.message
69
- : defaultMessage;
+): string => (isApiError(error) ? error.response.data.message : defaultMessage);
70
71
/**
72
*
0 commit comments