1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Do not throw HTTP errors in request node

Fixes #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
This commit is contained in:
Nick O'Leary 2021-07-22 23:48:30 +01:00
parent 7b106e5650
commit 5f6fcb2bc0
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -151,6 +151,7 @@ in your Node-RED user directory (${RED.settings.userDir}).
// Had to remove this to get http->https redirect to work
// opts.defaultPort = isHttps?443:80;
opts.timeout = node.reqTimeout;
opts.throwHttpErrors = false;
opts.method = method;
opts.headers = {};
opts.retry = 0;