Skip to content

Commit

Permalink
fix: check for error name as well as code
Browse files Browse the repository at this point in the history
  • Loading branch information
erinleigh90 committed Mar 30, 2024
1 parent 3a01869 commit ba0765f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const getRetryDecider =
(error as Error & { code: string }) ??
(await errorParser(response)) ??
undefined;
const errorCode = parsedError?.code;
const errorCode = parsedError?.code || parsedError?.name;
const statusCode = response?.statusCode;

return (
Expand Down

0 comments on commit ba0765f

Please sign in to comment.