Skip to content

Commit 6df6a0a

Browse files
committed
🐛 Fix throwAndDelegateError method
1 parent 49390d7 commit 6df6a0a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/util/error.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,11 @@ export const throwAndDelegateError = (
2525
}
2626

2727
const err = error as any;
28-
if (err.code || err.response?.status) {
28+
if (err.code || err.status || err.response?.status) {
2929
const status =
30-
err.response?.status || (err.code ? parseInt(err.code) : 500);
30+
err.status ||
31+
err.response?.status ||
32+
(err.code ? parseInt(err.code) : 500);
3133

3234
var errorType: IntegrationErrorType;
3335
switch (status) {

0 commit comments

Comments
 (0)