Skip to content

Commit

Permalink
forward 429 from provider
Browse files Browse the repository at this point in the history
allows us to retry it
  • Loading branch information
mifi committed Oct 13, 2023
1 parent 7bd5042 commit 3fa992b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/@uppy/companion/src/server/provider/error.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ function errorToResponse (err) {
return { code: 502, message: err.message }
}

if (err.statusCode === 429) {
return { code: 429, message: err.message }
}

if (err.statusCode >= 400) {
// 424 Failed Dependency
return { code: 424, message: err.message }
Expand Down

0 comments on commit 3fa992b

Please sign in to comment.