Node HTTP + error + Axios

Hi there :slight_smile:

I’m having issue requestion API with an http node. When the API return an error, it’s always formatted like this :

Wich is not exploitable for me to log the error. Is there a way to have the error well formated ?

Thanks :slight_smile:

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:

Hey @dubarseo

Can you share the workflow? It looks like it would be worth adding a set node after it that cleans the message and parses it as json.

1 Like

Sure, here it is :


When i test the API (http node) in POSTMAN i have no format problem when the error occurs.

It’s an API

@dubarseo did you manage to fix this?

Not so far, i need to test what i can do with the Set Node

1 Like

I’ve tried to code a JS function (thanks GPT) to parse my JSON.
It’s appears that the JSON is not formatted, throwing an error in n8n.
Its weird beacause the error dont look the same in POSTMAN

Hope it will work :slight_smile:

Still not working as i want, there is HTML in the API response but only on n8n side, i cant reproduce on POSTMAN side.

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