Skip to content

Commit 265675d

Browse files
committed
fix: typecheck
1 parent a1b8e90 commit 265675d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/utils/prepareErrorMessage.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@ export function prepareErrorMessage(error: unknown) {
77
if ('data' in error && error.data) {
88
if (typeof error.data === 'string') {
99
return error.data;
10-
} else if (typeof error.data === 'object' && 'message' in error.data) {
10+
} else if (
11+
typeof error.data === 'object' &&
12+
'message' in error.data &&
13+
typeof error.data.message === 'string'
14+
) {
1115
return error.data.message;
1216
}
1317
} else if ('statusText' in error && typeof error.statusText === 'string') {

0 commit comments

Comments
 (0)