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 a1b8e90 commit 265675dCopy full SHA for 265675d
src/utils/prepareErrorMessage.ts
@@ -7,7 +7,11 @@ export function prepareErrorMessage(error: unknown) {
7
if ('data' in error && error.data) {
8
if (typeof error.data === 'string') {
9
return error.data;
10
- } else if (typeof error.data === 'object' && 'message' in error.data) {
+ } else if (
11
+ typeof error.data === 'object' &&
12
+ 'message' in error.data &&
13
+ typeof error.data.message === 'string'
14
+ ) {
15
return error.data.message;
16
}
17
} else if ('statusText' in error && typeof error.statusText === 'string') {
0 commit comments