Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
opyate committed Feb 14, 2019
1 parent 317bd6a commit 908b6c7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,9 @@ function onError(err: AxiosError) {
// 5xx - Retry (Server errors)
[100, 199], [429, 429], [500, 599]
];
config.statusCodesToRetry = config.statusCodesToRetry || retryRanges;
config.statusCodesToRetry =
Object.values(config.statusCodesToRetry || retryRanges)
.map(Object.values);

// Put the config back into the err
(err.config as RaxConfig).raxConfig = config;
Expand Down

0 comments on commit 908b6c7

Please sign in to comment.