Skip to content

Commit

Permalink
fix: dont retry auth error
Browse files Browse the repository at this point in the history
  • Loading branch information
stephentuso committed Feb 4, 2021
1 parent 44123b7 commit f2809b1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/@uppy/companion/src/server/controllers/list.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { errorToResponse } = require('../provider/error')
const { errorToResponse, ProviderAuthError } = require('../provider/error')
const { retryWithDelay } = require('../helpers/utils')

function list ({ query, params, companion }, res, next) {
Expand Down Expand Up @@ -28,7 +28,8 @@ function list ({ query, params, companion }, res, next) {
retryWithDelay({
retryDelays: [5000, 10000, 15000, 20000],
action: getPerformList(false),
lastAction: getPerformList(true)
lastAction: getPerformList(true),
errorIsRetryable: (err) => !(err instanceof ProviderAuthError) || !err.isAuthError
})
}

Expand Down

0 comments on commit f2809b1

Please sign in to comment.