What do HTTP errors 400, 401, 403, 404, 429 and 500 mean

Published on 2026-10-21 by frfrand

What HTTP errors 400, 401, 403, 404, 429 and 500 (and 502, 503 and 504) mean, how they differ, and how to tell which layer of your website failed.

What do HTTP errors 400, 401, 403, 404, 429 and 500 mean

Short answer: 400 is a malformed request; 401, missing valid credentials; 403, that the server knows who you are but won't let you in; 404, that the resource does not exist at that URL; 429, that you exceeded a request limit; and 500, that the server failed to process the request. The 4xx codes point to the request and the 5xx codes to the server or an intermediary.

HTTP status codes indicate how a server responded to a request. A 404 usually means it did not find the requested resource; a 500 indicates an internal error while processing it. Understanding them allows diagnosing a website without guessing which component failed.

The number matters less than the family

The 2xx codes indicate success. The 3xx codes relate to redirects. The 4xx codes signal problems related to the client's request, and the 5xx codes indicate that the server could not fulfill it.

That does not mean that any 4xx is anyone's fault: a poorly designed API can also respond with an incorrect code.

400: bad request

A 400 Bad Request appears when the server cannot or does not want to process a request due to a problem it considers to be the client's.

Imagine you send a JSON with invalid syntax or parameters impossible to interpret. The server can return 400, ideally with a message explaining which field to check.

But do not use 400 as a generic response for any error. Distinguishing situations helps a lot those who use your API.

401 vs 403: a common confusion

401 Unauthorized has a somewhat misleading historical name: it usually indicates that the request lacks valid credentials to access the resource.

403 Forbidden indicates that the server understood the request but refuses to fulfill it. A person might be correctly identified and still not have permission to query an invoice.

Think of it this way: 401 means «I need valid credentials» and 403 means «you don't have access to this operation». In both cases there are nuances and particular authentication mechanisms.

404: resource not found

The classic 404 Not Found does not prove that the entire server is down. A route may be missing, a page may have been deleted, or an incorrect URL may be used.

Sometimes an API deliberately returns 404 to avoid revealing whether a private resource exists that someone does not have access to. This may be appropriate if it is contemplated by the security policy.

Before chasing a deployment error, check the exact URL, the HTTP method, and the routes actually registered by the application.

429: too many requests

A 429 Too Many Requests appears when a request limit has been exceeded. It may be temporary and accompanied by information about when to retry.

It does not necessarily mean that the website has a bug. It may be the expected response from a system that protects resources.

A responsible integration reduces frequency, respects server instructions, and avoids retrying hundreds of times per second.

500: the server failed

A 500 Internal Server Error indicates that an unexpected problem occurred while the server was handling the request.

It can be a code error, an incorrect dependency, an incomplete configuration, or many other causes. The code alone does not say which one.

To investigate it, you need to review the application logs and the corresponding request. Avoid showing full traces with passwords or secret variables to visitors.

What about the famous 502, 503, and 504?

A 502 Bad Gateway usually indicates that a proxy or intermediary received an invalid response from another server. A 503 Service Unavailable signals temporary unavailability or overload. A 504 Gateway Timeout indicates that the intermediary did not receive the necessary response in time.

These differences matter when you use Nginx in front of a backend. A 502 can point to a crashed process, while a 504 can appear when the backend takes too long.

How to investigate without wasting time

First reproduce the problem and note URL, method, code, and time. Then identify which component generated the response: browser, proxy, backend, or external service.

If you use several services, correlate records and requests. An HTTP error is a clue, not the complete diagnosis.

How does this look in ArduMaker?

In an application published on an ArduMaker VPS, the request goes through several layers: the Cloudflare proxy (when the domain goes through it, such as the subdomains created by the platform), the host's nginx, which terminates HTTPS, the nginx inside your VPS, and finally, your application. Knowing which layer responded saves a lot of time:

  • 521, 522, 523 or 524 are Cloudflare-specific codes: it could not connect to the origin server or it took too long. Check if the VPS and its nginx are running.
  • 502 usually comes from nginx. If the domain does not have its server block inside the VPS, you will see ArduMaker's notice page instead of your application; the 502 appears when the VPS nginx does not respond or when your application is not listening on 127.0.0.1 and on the configured port.
  • 500 comes from your application: the answer is in its logs.

From the panel, or with the MCP tools ver_logs_nginx_vps and ver_logs_systemd_vps, you can read the nginx logs and the VPS service logs. Even so, correctly interpreting the code is the first step.

Frequently asked questions

Does a 404 mean the server is down? No. It means the server responded, but did not find anything at that URL. If the server were down, you would see a connection error or a 5xx from some intermediary.

What do I do if an API returns 429? Lower the request frequency and, if the response includes the Retry-After header, wait that time before retrying. Retrying in a loop only prolongs the block.

Why do I receive 401 if I already logged in? This usually happens because the token or session cookie expired, is not being sent in that request, or belongs to another environment.

In summary: 401 is not 403, and 502 is not 504. Understanding those differences avoids fixing the wrong part of the system.

Sources: HTTP codes on MDN · HTTP Semantics RFC 9110.

What do HTTP errors 400, 401, 403, 404, 429 and 500 mean

Investigating HTTP errors without guessing

In an application published with ArduMaker, different errors point to different layers. 401 usually indicates missing valid authentication; 403 that the request is authenticated but not authorized, although there may be other controls; 404 that the route does not exist; 429 that a request limit has been reached; and 500 that the server failed to process the request.

Do not resolve a 500 by expanding CPU without evidence. Check the exact time of the error, the requested route, the API logs, and the PostgreSQL status. If Nginx returns 502, also verify that the API is listening on 127.0.0.1 and on the expected port: an app that only listens on ::1 (Node may resolve localhost to IPv6) will not respond to the VPS nginx.

Related: Rate limiting · What is Nginx.

  • HTTP
  • errores web
  • API

Keep reading

All articles · VPS plans