Skip to content

Commit

Permalink
🐛 Fix throwAndDelegateError method
Browse files Browse the repository at this point in the history
  • Loading branch information
ratkowski committed Jun 21, 2023
1 parent 49390d7 commit 6df6a0a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/util/error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@ export const throwAndDelegateError = (
}

const err = error as any;
if (err.code || err.response?.status) {
if (err.code || err.status || err.response?.status) {
const status =
err.response?.status || (err.code ? parseInt(err.code) : 500);
err.status ||
err.response?.status ||
(err.code ? parseInt(err.code) : 500);

var errorType: IntegrationErrorType;
switch (status) {
Expand Down

0 comments on commit 6df6a0a

Please sign in to comment.