8000 fix: Change error message thrown with redirect mode set to error (#653) · node-fetch/node-fetch@1e99050 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1e99050

Browse files
uwu-araRichienb
authored andcommitted
fix: Change error message thrown with redirect mode set to error (#653)
The original error message does not provide enough information about what went wrong. It simply states a configuration setting.
1 parent 244e6f6 commit 1e99050

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ export default function fetch(url, opts) {
125125
// HTTP fetch step 5.5
126126
switch (request.redirect) {
127127
case 'error':
128-
reject(new FetchError(`redirect mode is set to error: ${request.url}`, 'no-redirect'));
128+
reject(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${request.url}`, 'no-redirect'));
129129
finalize();
130130
return;
131131
case 'manual':

0 commit comments

Comments
 (0)
0