Skip to content

Commit

Permalink
Change message when redirect mode set to error
Browse files Browse the repository at this point in the history
The original error message does not provide enough information about
what went wrong. It simply states a configuration setting.

Via: node-fetch/node-fetch#653
  • Loading branch information
isaacs committed Oct 18, 2019
1 parent 2dc94ae commit 26ab6ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/index.js
Expand Up @@ -116,7 +116,7 @@ const fetch = (url, opts) => {
// HTTP fetch step 5.5
switch (request.redirect) {
case 'error':
reject(new FetchError(`redirect mode is set to error: ${
reject(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${
request.url}`, 'no-redirect'))
finalize()
return
Expand Down

0 comments on commit 26ab6ec

Please sign in to comment.