# Probems with http request-Node: ERR\_GOT\_REQUEST\_ERROR

**URL:** <https://discourse.nodered.org/t/probems-with-http-request-node-err-got-request-error/93196>\
**Category:** General\
**Created:** [17 November 2024 10:03 UTC](https://discourse.nodered.org/t/probems-with-http-request-node-err-got-request-error/93196 "2024-11-17T10:03:01Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![WernerM96](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/wernerm96/32/46471_2.png) [@WernerM96](https://discourse.nodered.org/u/WernerM96)\
**Post date:** [17 November 2024 10:03 UTC](https://discourse.nodered.org/t/probems-with-http-request-node-err-got-request-error/93196/1 "2024-11-17T10:03:01Z")

</div>

Hey,

i reinstalled node-red. Current version is 4.0.5. I transfered the flows. Everything is working fine - except the htttp request nodes. I've got such a error on every single node:

 ![grafik](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/6/86c0f33172c66c253398d485f20e22e09f0d440c.png)

Can maybe somebody help? Is there any possibility to debug a little bit further?

Best greats and have a nice weekend!

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [17 November 2024 10:30 UTC](https://discourse.nodered.org/t/probems-with-http-request-node-err-got-request-error/93196/2 "2024-11-17T10:30:15Z")

</div>

Have you selected Use Proxy in the http node?

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [17 November 2024 10:33 UTC](https://discourse.nodered.org/t/probems-with-http-request-node-err-got-request-error/93196/3 "2024-11-17T10:33:42Z")

</div>

> [@WernerM96](#):
>
> I transfered the flows

How did you do this?

If there are credentials involved & you simply imported a backup, the credentials may be lost.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [17 November 2024 10:44 UTC](https://discourse.nodered.org/t/probems-with-http-request-node-err-got-request-error/93196/4 "2024-11-17T10:44:58Z")

</div>

Also, which nodes is it that are showing those errors in the debug pane?

---

<div class="post-metadata">

**Author:** ![WernerM96](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/wernerm96/32/46471_2.png) [@WernerM96](https://discourse.nodered.org/u/WernerM96)\
**Post date:** [18 November 2024 11:51 UTC](https://discourse.nodered.org/t/probems-with-http-request-node-err-got-request-error/93196/5 "2024-11-18T11:51:25Z")

</div>

No i didn't. Do i need to use it? Most of the http-request-nodes are network-internal. So they only access other devices in the same network.

---

<div class="post-metadata">

**Author:** ![WernerM96](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/wernerm96/32/46471_2.png) [@WernerM96](https://discourse.nodered.org/u/WernerM96)\
**Post date:** [18 November 2024 11:52 UTC](https://discourse.nodered.org/t/probems-with-http-request-node-err-got-request-error/93196/6 "2024-11-18T11:52:51Z")

</div>

No credentials involved. I can also send the same requests via postman on windows.  
I copied the complete .node-red folder with the flows-files

---

<div class="post-metadata">

**Author:** ![WernerM96](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/wernerm96/32/46471_2.png) [@WernerM96](https://discourse.nodered.org/u/WernerM96)\
**Post date:** [18 November 2024 11:53 UTC](https://discourse.nodered.org/t/probems-with-http-request-node-err-got-request-error/93196/7 "2024-11-18T11:53:51Z")

</div>

Upper error is triggered by the xml node. The second error is the error of the http request itsself.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [18 November 2024 11:57 UTC](https://discourse.nodered.org/t/probems-with-http-request-node-err-got-request-error/93196/8 "2024-11-18T11:57:44Z")

</div>

> [@WernerM96](#):
>
> I copied the complete .node-red folder with the flows-files

Ok, hopefully you did not copy `node_modules` and you ran `npm install` inside the destination `.node-red` folder? to get updates & run compilation steps for nodes with binaries?

Would probably be worth deleting the `package-lock.json` and running `npm install` inside `.node-red` to get any updates too.

---

<div class="post-metadata">

**Author:** ![WernerM96](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/wernerm96/32/46471_2.png) [@WernerM96](https://discourse.nodered.org/u/WernerM96)\
**Post date:** [18 November 2024 17:01 UTC](https://discourse.nodered.org/t/probems-with-http-request-node-err-got-request-error/93196/9 "2024-11-18T17:01:47Z")

</div>

I tried without copying this folder (and instead runing npm install) but it also dont work. In this case my knx-ultimate-config doesnt work and crashes. With copying only the http request nodes dont work.

I'm just desperate...

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [18 November 2024 18:16 UTC](https://discourse.nodered.org/t/probems-with-http-request-node-err-got-request-error/93196/10 "2024-11-18T18:16:41Z")

</div>

Can you capture the full error using a catch node

### add catch node + debug

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/3/33ca51dd7b2c0f7e1478bdceaefbb485d138b841.png)

### catch node

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/9/19b8f30352413c7c258fee75099adf6a2cf1e347.png)

### http settings settings

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/3/b3ec8297b97d675bdb261a12d40c9d52373df4fe.png)

### debug settings

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/f/ffec8241f394d149b3d2c13f9d6f7857a43491bb.png)

then copy the full msg using the `copy value button`

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/e/fe07162aeab6c248977a3d0593f114f64b1da75a.png)

and paste it into a code block

`````  
`paste copied msg in between 3 back ticks like this`  
`````

---

<div class="post-metadata">

**Author:** ![WernerM96](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/wernerm96/32/46471_2.png) [@WernerM96](https://discourse.nodered.org/u/WernerM96)\
**Post date:** [18 November 2024 19:08 UTC](https://discourse.nodered.org/t/probems-with-http-request-node-err-got-request-error/93196/11 "2024-11-18T19:08:43Z")

</div>

```auto

{"payload":1731956852032,"topic":"","_msgid":"16258161e26933d2","error":{"message":"RequestError: Expected value which is `predicate returns truthy for any value`, received values of types `Function`.","source":{"id":"b589c63c7527ecfa","type":"http request","count":1},"stack":"RequestError: Expected value which is `predicate returns truthy for any value`, received values of types `Function`.\n at Request._destroy (file:///usr/local/lib/node_modules/node-red/node_modules/got/dist/source/core/index.js:482:21)\n at _destroy (node:internal/streams/destroy:109:10)\n at Request.destroy (node:internal/streams/destroy:71:5)\n at Request.flush (file:///usr/local/lib/node_modules/node-red/node_modules/got/dist/source/core/index.js:241:22)\n at lastHandler (file:///usr/local/lib/node_modules/node-red/node_modules/got/dist/source/create.js:37:26)\n at iterateHandlers (file:///usr/local/lib/node_modules/node-red/node_modules/got/dist/source/create.js:49:28)\n at got (file:///usr/local/lib/node_modules/node-red/node_modules/got/dist/source/create.js:69:16)\n at HTTPRequest._inputCallback (/usr/local/lib/node_modules/node-red/node_modules/@node-red/nodes/core/network/21-httprequest.js:602:13)\n at /usr/local/lib/node_modules/node-red/node_modules/@node-re..."}}

```

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [18 November 2024 19:31 UTC](https://discourse.nodered.org/t/probems-with-http-request-node-err-got-request-error/93196/12 "2024-11-18T19:31:59Z")

</div>

> [@WernerM96](#):
>
> `predicate returns truthy for any value`

According to that error, you have nested search params in your query.  
ref: [searchParams working differently to qs in request · Issue #2083 · sindresorhus/got · GitHub](https://github.com/sindresorhus/got/issues/2083)

can you:

1. add a FULL debug BEFORE the HTTP request, capture the FULL msg that goes into the REQUEST node & paste it in a reply
2. select the INJECT and the HTTP node (only the one that is failing) and export it (`CTRL-E`) and paste it in a reply

* * *

PS, please use the `reply` button attached to the message you are replying to (not the one at the very bottom) otherwise we dont get a notification

---

<div class="post-metadata">

**Author:** ![WernerM96](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/wernerm96/32/46471_2.png) [@WernerM96](https://discourse.nodered.org/u/WernerM96)\
**Post date:** [20 November 2024 16:28 UTC](https://discourse.nodered.org/t/probems-with-http-request-node-err-got-request-error/93196/13 "2024-11-20T16:28:22Z")

</div>

DEBUG:

> {"payload":1732119449450,"topic":"","\_msgid":"416a7c4c605b7c2f"}

So only the timestamp will be sended as payload and a empty topic. After that first try i tried to clear the sending-data so the inject looks like this:

 ![grafik](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/8/b8a656b9e6a89c4e3b3eeb8d9c30bb21debb7096.png)

But nothing changed. Now it looks like this:

 ![grafik](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/3/d3e241ff254bac06793cf811dbf45fcb3a29e68c.png)

This is the config of one of the http-request-nodes:

 ![grafik](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/1/31f7f9d31712f493972fc73dbff1f6c0089b5eda.png)

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [20 November 2024 17:58 UTC](https://discourse.nodered.org/t/probems-with-http-request-node-err-got-request-error/93196/14 "2024-11-20T17:58:32Z")

</div>

Hmm, i ecpected the catch node to catch the error and show me more than what you have posted.

did you point the catch node at the HTTP node?

Which debug did that message come out of?

Probably better to use separate debugs for HTTP and CATCH (and name them too)

---

<div class="post-metadata">

**Author:** ![WernerM96](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/wernerm96/32/46471_2.png) [@WernerM96](https://discourse.nodered.org/u/WernerM96)\
**Post date:** [20 November 2024 18:51 UTC](https://discourse.nodered.org/t/probems-with-http-request-node-err-got-request-error/93196/15 "2024-11-20T18:51:16Z")

</div>

[flows(4).json](https://discourse.nodered.org/uploads/short-url/sFqj1KCODsjvf5VCC3O9tPSXjxU.json) (834 Bytes)  
Here is the export of my flow (inject, request , etc.)

---

<div class="post-metadata">

**Author:** ![WernerM96](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/wernerm96/32/46471_2.png) [@WernerM96](https://discourse.nodered.org/u/WernerM96)\
**Post date:** [20 November 2024 18:54 UTC](https://discourse.nodered.org/t/probems-with-http-request-node-err-got-request-error/93196/16 "2024-11-20T18:54:47Z")

</div>

Yes i point it to the http node:

 ![grafik](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/2/120b0b7cb6b984a7d626c1b73324909e0b24b308.png)

The debug message of the catch node says:

 ![grafik](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/6/46a5134744756da17de598ceeb6cc2796144d6f0.png)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [18 February 2025 18:55 UTC](https://discourse.nodered.org/t/probems-with-http-request-node-err-got-request-error/93196/17 "2025-02-18T18:55:11Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
