Skip to content

Commit

Permalink
Merge pull request #5 from juliencampion/patch-1
Browse files Browse the repository at this point in the history
Throw the right error from failing second request
  • Loading branch information
vlki authored Jul 31, 2019
2 parents b389282 + bc1ab08 commit 95b0f7d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/configureRefreshFetch.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ function configureRefreshFetch (configuration: Configuration) {
}

return refreshingTokenPromise
.then(() => fetch(url, options))
.catch(() => {
// If refreshing fails, continue with original error
throw error
})
.then(() => fetch(url, options))
} else {
throw error
}
Expand Down

0 comments on commit 95b0f7d

Please sign in to comment.