Steps
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 line401 - "{...}"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).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.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 withouthttps://givesInvalid URL. Paste the final URL intocurlwith the same method: if curl fails the same way, the problem is the API or the network, not n8n.Use 127.0.0.1, not localhost, for local services
On our test machine
localhostresolved to the IPv6 address::1first, so a service listening only on127.0.0.1gaveconnect ECONNREFUSED ::1:5799. Writinghttp://127.0.0.1:5799fixed it. In Docker,localhostis the n8n container itself, so use the service name orhost.docker.internalinstead.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 happened | Error n8n showed | Fix |
|---|---|---|
| API answered 401 | Authorization failed - please check your credentials401 - "{"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 403 | Forbidden - 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 404 | The resource you are requesting could not be found404 - "{"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 endpoint | Method not allowed - please check you are using the right HTTP method405 - ... | Set Method to what the API docs say. |
| API answered 500 | The service was not able to process your request500 - "{"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 page | Bad gateway - the service failed to handle your request502 - "<html>...502 Bad Gateway..." | The service behind a proxy is down or restarting. Retry later. |
| Nothing listening on that port | The service refused the connection - perhaps it is offlineconnect 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 only | connect ECONNREFUSED ::1:5799 | Use http://127.0.0.1:5799. |
| Response slower than the Timeout option (1,000 ms) | The connection was aborted, perhaps the server is offlinetimeout of 1000ms exceeded | Raise Timeout in Options, or ask the API for less data per call. |
| Self-signed HTTPS certificate | SSL Issue: consider using the 'Ignore SSL issues' option | Turn 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 exist | URL parameter must be a string, got undefined | Check the field name in the input panel; names are case-sensitive. |
| API sent broken JSON with a JSON content type | Invalid JSON in response body | Set Response Format to Text and look at what really came back. |
| Response Format set to JSON, API sent HTML or broken JSON | Response 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 comma | The value in the "JSON Body" field is not valid JSON | Fix the JSON, or build it with an expression: {{ JSON.stringify({ name: $json.name }) }} worked in our test. |
| JSON Headers missing a closing brace | The value in the "JSON Headers" field is not valid JSON | Fix 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
- Sending to Telegram? The Telegram node shows the same generic
Bad request - please check your parametersand puts Telegram's real reason on the second line: see n8n Telegram node not working. - Your error workflow never fires after an HTTP failure? Retries that succeed and Continue On Error skip it: see n8n error workflow not triggering.
- Calling a GraphQL API? The GraphQL node turns an errors array into a failure but passes a 401 through green: see n8n GraphQL node not working.
- Calling your own n8n webhook and getting an empty 200, one item instead of all, or a bare
Error in workflow? That is the Respond to Webhook node on the other side, see n8n Respond to Webhook not working. - A JWT the API rejects although n8n signed it. The JWT node Payload Claims fields write
expiresInandsubject, notexpandsub. Build the payload as JSON: n8n JWT node not working. - A downloaded "zip" that is an error page. Unzipping an HTML page saved as
export.zipfails withinvalid zip datain the Compression node: n8n Compression node not working. - An HTML page counts as success. With the default Response Format (autodetect), a 200 answer with an HTML page came through as one item,
{ data: "<html>...Login page..." }, and the workflow carried on. An expired session or a wrong URL can look exactly like this. Set Response Format to JSON when you expect JSON, so the node fails loudly instead. - On Error: Continue throws away your input fields. With Continue, the 404 item that reached the next node held only
error; the original fieldnwas gone. With Continue (using error output), the item on the error branch keptn: 1and addederror, so you still know which record failed. - Never Error hides the status code unless you ask for it. With Never Error and Include Response Headers and Status on, a 500 came through as
statusCode: 500,statusMessage: "Internal Server Error"plus the body and headers. Add an If node onstatusCodeafter it. - DNS errors may not look like DNS errors. On our test machine, a host name that doesn't exist ended in
connect ETIMEDOUTbecause the network answered for it. If a timeout makes no sense, check the host name for typos.
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
- Airtable node failing with
Unauthorized,NOT_FOUNDorNot a valid Airtable Base ID: n8n Airtable node not working. - Calling Notion with your own HTTP Request? The Notion node version 3 already speaks the new data source API; its errors are in n8n Notion node not working.
- Google Sheets node failing with
Bad request,invalid_grantor a private key error: n8n Google Sheets node not working. - Slack node failing with
invalid_authornot_authed: n8n Slack node not working. - Calling your own n8n public API and getting 401, 403 or HTML? See n8n API key 401 Unauthorized fixes.
What we tested, and what we didn't
- All results above come from real runs of self-hosted n8n 2.43.7 on 19 October 2026, HTTP Request node version 4.2, against a small local test API (plain HTTP plus HTTPS with a self-signed certificate).
- We didn't test n8n Cloud, Docker networking, proxies, or predefined credential types (OAuth2 and so on). The Docker advice above comes from n8n's own docs, not from our runs.
Start from a working agent
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
- n8n Supabase node errors: credentials, RLS and filter fixes, 41 runs
- n8n OpenAI node not working? 18 tests, every error decoded
- n8n Postgres node errors: connection, SQL and insert fixes, 33 runs
- n8n Redis node errors and hangs: connection, TLS and Set fixes, 50 tests
- n8n Google Drive Trigger not working: not firing, activation errors and fixes
New guides
- GitHub release notifications in Slack (any public repo, stable releases only)
- Send RSS feeds to Slack with a keyword filter (free, incoming webhook)
- Forward emails to a Slack channel (Gmail, Outlook, any IMAP), free with an incoming webhook
- n8n Google Sheets Trigger not working: not firing, activation errors and fixes