Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5f6fcb2

Browse files
committed
Do not throw HTTP errors in request node
Fixes node-red#3082 GOT will throw errors for non-successful http responses by default. We need to turn that off to be consistent with the 1.x behaviour using the request module
1 parent 7b106e5 commit 5f6fcb2

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

packages/node_modules/@node-red/nodes/core/network/21-httprequest.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ in your Node-RED user directory (${RED.settings.userDir}).
151151
// Had to remove this to get http->https redirect to work
152152
// opts.defaultPort = isHttps?443:80;
153153
opts.timeout = node.reqTimeout;
154+
opts.throwHttpErrors = false;
154155
opts.method = method;
155156
opts.headers = {};
156157
opts.retry = 0;

0 commit comments

Comments
 (0)