// guides · n8n error index

n8n HTTP Request node errors: 401, 404, ECONNREFUSED, SSL and 12 more, fixed

The exact errors the n8n HTTP Request node shows, what each one means and the fix: 401, 403, 404, 405, 500, 502, connection refused, localhost, timeout, SSL, bad URL and invalid JSON. Tested on n8n 2.43.7.

Updated 2026-10-19 · about 10 minutes

Still stuck after these steps? Paste your exact n8n error and we'll reproduce it and email you the fix, free →

Steps

  1. Read both lines of the error

    n8n shows two things: a friendly first line such as Authorization failed - please check your credentials, then the raw line 401 - "{...}" with the status code and the body the API sent back. The second line is the useful one: it usually says exactly what the API didn't like (Invalid API key, missing scope, db timeout).

  2. Match the status code

    4xx means the request is wrong (key, permission, URL, method) and sending it again won't help. 5xx means the other server failed and a retry later often works. No status code at all (ECONNREFUSED, timeout, SSL) means n8n never got a normal answer. The table below has every one we hit, with the fix.

  3. Check the URL and method n8n really sent

    If the URL comes from an expression, an empty field gives URL parameter must be a string, got undefined, and a URL without https:// gives Invalid URL. Paste the final URL into curl with the same method: if curl fails the same way, the problem is the API or the network, not n8n.

  4. Use 127.0.0.1, not localhost, for local services

    On our test machine localhost resolved to the IPv6 address ::1 first, so a service listening only on 127.0.0.1 gave connect ECONNREFUSED ::1:5799. Writing http://127.0.0.1:5799 fixed it. In Docker, localhost is the n8n container itself, so use the service name or host.docker.internal instead.

  5. Decide what should happen when the call fails

    In the node's Settings, On Error can stop the workflow (default), Continue, or Continue (using error output). For errors that come and go, turn on Retry On Fail. For an API that answers 4xx/5xx on purpose, Options > Response > Never Error passes the response on as data so you can branch on it.

Every error we got, and the fix

Seeing timeout of 2000ms exceeded, or a slow call cancelled with the whole workflow? See n8n execution timeout.

Big JSON download crashing n8n with possible out-of-memory issue? Use Response Format File or Text: see n8n out of memory errors.

On 19 October 2026 we ran 24 small workflows in n8n 2.43.7 with n8n execute: a Manual Trigger, a Code node sending one item, an HTTP Request node (version 4.2) calling a small local test API, then an Edit Fields (Set) node to see whether the workflow carried on. The first column is what n8n shows at the top of the error; the second is the raw line underneath.

What happenedError n8n showedFix
API answered 401Authorization failed - please check your credentials
401 - "{"error": "invalid_api_key", ...}"
Wrong, expired or missing key. Check the credential, the header name (Authorization: Bearer ... vs X-API-Key) and that there are no spaces around the key.
API answered 403Forbidden - perhaps check your credentials?
403 - "{"message": "Forbidden: missing scope read:items"}"
The key works but isn't allowed to do this. Add the missing scope or permission on the API side.
API answered 404The resource you are requesting could not be found
404 - "{"message": "Not Found"}"
Typo in the path, wrong API version, or an ID from an expression that is empty or from another account. Some APIs also answer 404 for things your key can't see.
POST to a GET-only endpointMethod not allowed - please check you are using the right HTTP method
405 - ...
Set Method to what the API docs say.
API answered 500The service was not able to process your request
500 - "{"message": "Internal error: db timeout"}"
The other server failed. Read its message, retry later, or turn on Retry On Fail. If it fails every time, the request body may be what breaks it.
Proxy answered 502 with an HTML pageBad gateway - the service failed to handle your request
502 - "<html>...502 Bad Gateway..."
The service behind a proxy is down or restarting. Retry later.
Nothing listening on that portThe service refused the connection - perhaps it is offline
connect ECONNREFUSED 127.0.0.1:1
Wrong port, or the service isn't running. Check with curl from the machine (or container) that runs n8n.
http://localhost:5799, service on 127.0.0.1 onlyconnect ECONNREFUSED ::1:5799Use http://127.0.0.1:5799.
Response slower than the Timeout option (1,000 ms)The connection was aborted, perhaps the server is offline
timeout of 1000ms exceeded
Raise Timeout in Options, or ask the API for less data per call.
Self-signed HTTPS certificateSSL Issue: consider using the 'Ignore SSL issues' optionTurn on Ignore SSL Issues only for a server you control (it worked in our test); for public APIs, fix the certificate instead.
URL without http://Invalid URL: 127.0.0.1:5799/ok. URL must start with "http" or "https".Add https:// (or http://).
URL expression pointing at a field that doesn't existURL parameter must be a string, got undefinedCheck the field name in the input panel; names are case-sensitive.
API sent broken JSON with a JSON content typeInvalid JSON in response bodySet Response Format to Text and look at what really came back.
Response Format set to JSON, API sent HTML or broken JSONResponse body is not valid JSON. Change "Response Format" to "Text"Do what it says, then read the text: an HTML page often means a login page or a wrong URL.
JSON Body with a trailing commaThe value in the "JSON Body" field is not valid JSONFix the JSON, or build it with an expression: {{ JSON.stringify({ name: $json.name }) }} worked in our test.
JSON Headers missing a closing braceThe value in the "JSON Headers" field is not valid JSONFix the JSON, or switch to Using Fields Below and add each header as a name and value.

Getting The service is receiving too many requests from you (429)? That one has its own guide: n8n 429 Too Many Requests: 3 fixes we tested.

Calling OpenAI with the OpenAI node instead of an HTTP Request node? It shows the same generic lines (Bad request - please check your parameters) and hides the reason on the next line: see n8n OpenAI node not working.

Silent traps: no error, wrong result

Only getting the first page, duplicates, or requests that never stop? See n8n HTTP Request pagination not working.

Pulling data out of the page you fetched? See n8n HTML Extract not working (empty values, selectors, tables).

API returns XML instead of JSON? Parse it with the XML node: see n8n XML node not working (one item vs array, attributes, parse errors).

Good to know

What we tested, and what we didn't

FAQ

What does "Authorization failed - please check your credentials" mean in n8n?

The API answered 401: it didn't accept your key or token. Check that the credential is the right one, not expired, sent in the header the API expects, and has no extra spaces. The line under the error shows the API's own reason.

How do I fix "The resource you are requesting could not be found" in the HTTP Request node?

It is a 404 from the API. Check the path and API version against the docs, make sure IDs from expressions aren't empty, and confirm the method. Some APIs also return 404 for records your key isn't allowed to see.

Why does n8n say ECONNREFUSED for localhost?

Either nothing is listening on that port, or localhost resolved to the IPv6 address ::1 while the service listens only on 127.0.0.1. In our test, changing localhost to 127.0.0.1 fixed it. In Docker, localhost means the n8n container itself.

How do I make the HTTP Request node continue when the API returns an error?

In the node Settings, set On Error to "Continue (using error output)" so failed items go to a separate branch and keep their fields, or turn on Never Error in Options so the response is passed on as data and you can check the status code.

What does "SSL Issue: consider using the 'Ignore SSL issues' option" mean?

The server's HTTPS certificate isn't trusted, often because it is self-signed or expired. Turning on Ignore SSL Issues makes the call work, but only do that for a server you control.

Related guides

New guides

Still stuck on your n8n error?

Paste the exact error and say what the workflow should do. We reproduce it on a real n8n install and email you the fix or a working workflow, usually within 24h. Free while we're in beta.

We'll only email you about your error and TaskToAgent.