# Weird thing happening with http request

**URL:** <https://discourse.nodered.org/t/weird-thing-happening-with-http-request/70260>\
**Category:** General\
**Tags:** http-request\
**Created:** [8 November 2022 13:55 UTC](https://discourse.nodered.org/t/weird-thing-happening-with-http-request/70260 "2022-11-08T13:55:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![makerstorage](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/makerstorage/32/57594_2.png) [@makerstorage](https://discourse.nodered.org/u/makerstorage)\
**Post date:** [8 November 2022 13:55 UTC](https://discourse.nodered.org/t/weird-thing-happening-with-http-request/70260/1 "2022-11-08T13:55:16Z")

</div>

Hi Everybody,  
I have a http request node and It is working great with an inject node which sends the data to it. I am only setting msg.payload msg.direction and msg.lot. I am using them to create the header and the body of the http request. This test set up working every time. The problem is my other nodes doing their jobs and at the end I am setting these params in a function node as below

```auto
temp=msg;
msg = {}
msg._msgid=temp._msgid;
msg.payload = temp.payload;
msg.direction = temp.direction;
msg.lot = parseInt(temp.lot).toString();

return msg;

```

When the system triggers the http request over this function node I am getting below error. (not always so it is very hard to reproduce the error)

The requested URL was rejected. Please consult with your administrator.  
Your support ID is: 12854212305036220401

I am printing out to debug panel the inject node output and the function node output before sending them to http request and they are exactly same. (printing out hole msg object)

Is there something passing through the line except the msg object?

I can try your suggestions. As I said before it is very hard to reproduce the error.  
any suggestions are welcome

Regards  
Nuri

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [8 November 2022 15:23 UTC](https://discourse.nodered.org/t/weird-thing-happening-with-http-request/70260/2 "2022-11-08T15:23:16Z")

</div>

Try adding a `catch` node connected to a `debug` node (set to diswplay the complete msg object) and see if that shows anything.

---

<div class="post-metadata">

**Author:** ![makerstorage](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/makerstorage/32/57594_2.png) [@makerstorage](https://discourse.nodered.org/u/makerstorage)\
**Post date:** [10 November 2022 07:33 UTC](https://discourse.nodered.org/t/weird-thing-happening-with-http-request/70260/3 "2022-11-10T07:33:29Z")

</div>

Here is the catch node return to the debug panel

```auto
{
   "_msgid":"5ab344c569223b2c",
   "payload":"<html><head><title>Request Rejected</title></head><body>The requested URL was rejected. Please consult with your administrator.<br><br>Your support ID is: 12854212327348100118<br><br><a href='javascript:history.back();'>[Go Back]</a></body></html>",
   "direction":"SELL",
   "lot":"20",
   "symbol":"HEKTS",
   "headers":{
      "cache-control":"no-cache",
      "connection":"close",
      "content-type":"text/html; charset=utf-8",
      "pragma":"no-cache",
      "content-length":"247",
      "x-node-red-request-node":"3aec619c"
   },
   "statusCode":200,
   "responseUrl":"https://www.algolab.com.tr/api/api/SendOrder",
   "redirectList":[
      
   ],
   "retry":0,
   "error":{
      "message":"Order Error",
      "source":{
         "id":"96508857633674d6",
         "type":"function",
         "name":"isSuccess",
         "count":1
      }
   }
}

```

---

<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:** [9 January 2023 07:34 UTC](https://discourse.nodered.org/t/weird-thing-happening-with-http-request/70260/4 "2023-01-09T07:34:08Z")

</div>

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