Skip to content

Commit 8be9c3e

Browse files
committed
🐛 fix AxiosError not using error code properly bug
1 parent 250f62e commit 8be9c3e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/util/error.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ export const throwAndDelegateError = (
2424
errorLogger(source, errorMessage, apiKey);
2525
}
2626
if (axios.isAxiosError(error)) {
27-
const status = error.response?.status || 500;
27+
const status =
28+
error.response?.status || (error.code ? parseInt(error.code) : 500);
2829
var errorType: IntegrationErrorType;
2930
switch (status) {
3031
case 401:

0 commit comments

Comments
 (0)