Http request Bug

Workflow was running fine, now the http node is returning the following error.

RedirectableRequest.handleResponse (/app/code/node_modules/axios/lib/adapters/http.js:533:9)\n    at RedirectableRequest.emit (node:events:529:35)\n    at RedirectableRequest.emit (node:domain:489:12)\n    at RedirectableRequest._processResponse (/app/code/node_modules/follow-redirects/index.js:398:10)\n    at ClientRequest.RedirectableRequest._onNativeResponse (/app/code/node_modules/follow-redirects/index.js:91:12)\n    at Object.onceWrapper (node:events:632:26)\n    at ClientRequest.emit (node:events:517:28)\n    at ClientRequest.emit (node:domain:489:12)\n    at HTTPParser.parserOnIncomingClient (node:_http_client:700:27)
code:ERR_BAD_REQUEST

Just doing a simple get request. tested the api on rapid api and its working fine. Was also working fine previously but is now returning the error above. restarting n8n didnt fix the issue.

any help is appreciated

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

running latest version on cloudron

copying the same nodes to anther workflow Only fixed the issues temporarily, I still have not found a solution. Also forgot to mention but Im using a main workflow and a subworkflow to manage memory. I dont know why that would matter especially since it was working fine yesterday but it might be relevant.

1 Like

3d

copying the same nodes to anther workflow Only fixed the issues temporarily

Hi @Trash, I am sorry you’re having trouble. If your request is working first, but then produces a bad request error, I suspect your service simply rejects additional requests at some point. Possibly because you have hit a rate limit or because one of your input items has an unexpected format.

Can you share a workflow using which your problem can be reproduced along with suitable input data (this can of course be redacted, but it’d be good to understand your data structure)?

Thanks for the reply.

everything was working fine after copying and pasting it to another workflow which is what let me to believe that this isn’t an API issue.

the second http node is supposed to return more than 1 item, but returns the following

message:404 - "{\"detail\":\"Not found\"}"
name:AxiosError
stack:AxiosError: 404 - "{\"detail\":\"Not found\"}"\n at settle (/app/code/node_modules/axios/lib/core/settle.js:19:12)\n at RedirectableRequest.handleResponse (/app/code/node_modules/axios/lib/adapters/http.js:533:9)\n at RedirectableRequest.emit (node:events:529:35)\n at RedirectableRequest.emit (node:domain:489:12)\n at RedirectableRequest._processResponse (/app/code/node_modules/follow-redirects/index.js:398:10)\n at ClientRequest.RedirectableRequest._onNativeResponse (/app/code/node_modules/follow-redirects/index.js:91:12)\n at Object.onceWrapper (node:events:632:26)\n at ClientRequest.emit (node:events:517:28)\n at ClientRequest.emit (node:domain:489:12)\n at HTTPParser.parserOnIncomingClient (node:_http_client:700:27)
code:ERR_BAD_REQUEST
status:404

Since it was working fine earlier and it was working when activating manually (vs getting triggered by main workflow) I assumed this might be some sort of bug but you’re right it might be an API issue but Im not sure.

So the 404 error would be coming from the API you are calling. For debugging purposes, perhaps you can redirect the request to a URL provided by a service like https://webhook.site/? This allows you to inspect all request details, so you can compare the actual request made by n8n with the documentation of the API you’re calling and identify any potentially missing or wrong values.