Skip to content

Commit

Permalink
Throw the right error from failing second request
Browse files Browse the repository at this point in the history
Fixes #4.
  • Loading branch information
juliencampion authored Jul 30, 2019
1 parent b389282 commit bc1ab08
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 bc1ab08

Please sign in to comment.