Skip to content

Commit b734bea

Browse files
authored
fix: Check for message in Seam API errors (#209)
1 parent a21fbe8 commit b734bea

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/lib/seam/connect/error-interceptor.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@ const isApiErrorResponse = (
5353
typeof data.error === 'object' &&
5454
data.error != null &&
5555
'type' in data.error &&
56-
typeof data.error.type === 'string'
56+
typeof data.error.type === 'string' &&
57+
'message' in data.error &&
58+
typeof data.error.message === 'string'
5759
)
5860
}
5961

0 commit comments

Comments
 (0)