<!-- HTTP and network error guides — Uptimely -->
> Markdown version of https://getuptimely.com/errors — the page itself is the canonical copy.

Error guides

# HTTP and network errors, from the server side

Most pages about “502 Bad Gateway” tell the reader to clear their cache and try again later, which is useless advice to the one person who can actually fix it. These guides are written for whoever runs the server: what the code says about your stack, the causes worth checking in order, how to tell whose side the problem is on, and what an uptime check will and will not see.

For the vocabulary rather than the codes, the [monitoring glossary](https://getuptimely.com/glossary) defines the terms these guides use. For TLS and certificate failures such as 525 and 526, [SSL certificate monitoring](https://getuptimely.com/features/ssl-certificate-monitoring) shows what an Uptimely certificate monitor reads and which rules alert on it. For the machine-readable errors the Uptimely API itself returns, see the [API documentation](https://getuptimely.com/docs/api).

## Client errors (4xx)

The request was at fault. On a monitoring check that almost always means the check needs fixing rather than the service — with two exceptions.

### [4xx client errors](https://getuptimely.com/errors/4xx)

The class of responses that means the request was at fault. For a monitor, a 4xx usually means the check is misconfigured.

### [400 Bad Request](https://getuptimely.com/errors/400)

The server could not parse or would not accept the request as sent — it was malformed before any logic ran.

### [401 Unauthorized](https://getuptimely.com/errors/401)

The request needs authentication and did not supply valid credentials — the server does not know who you are.

### [403 Forbidden](https://getuptimely.com/errors/403)

The server understood the request and refuses to fulfil it — authentication will not change the answer.

### [404 Not Found](https://getuptimely.com/errors/404)

The server has nothing at that path — and it will not say whether it never did or no longer does.

### [405 Method Not Allowed](https://getuptimely.com/errors/405)

A 405 Method Not Allowed error means the URL exists but does not accept the HTTP method used, commonly a GET sent to an endpoint built for POST.

### [408 Request Timeout](https://getuptimely.com/errors/408)

The server gave up waiting for the client to finish sending its request.

### [410 Gone](https://getuptimely.com/errors/410)

The resource existed and has been permanently removed — a deliberate, final version of 404.

### [429 Too Many Requests](https://getuptimely.com/errors/429)

The client has been rate limited — the server is deliberately shedding its requests to protect itself.

### [499 Client Closed Request](https://getuptimely.com/errors/499)

Nginx's own code for a client that hung up before the response was ready — a symptom of slowness, not a cause.

## Server errors (5xx)

The failure is on your side. The specific code identifies the layer, which is most of the triage.

### [5xx server errors](https://getuptimely.com/errors/5xx)

The class meaning the server failed to fulfil a request that was, as far as it could tell, valid.

### [500 Internal Server Error](https://getuptimely.com/errors/500)

The application hit an unhandled failure — the generic answer when nothing more specific applies.

### [501 Not Implemented](https://getuptimely.com/errors/501)

The server does not support the functionality needed to fulfil the request at all.

### [502 Bad Gateway](https://getuptimely.com/errors/502)

A proxy asked your application for a response and got something it could not use — or nothing at all.

### [503 Service Unavailable](https://getuptimely.com/errors/503)

The server is deliberately refusing to serve right now — overloaded, in maintenance, or with nothing healthy to route to.

### [504 Gateway Timeout](https://getuptimely.com/errors/504)

A proxy waited for your application and gave up — the upstream was reachable, just too slow.

### [508 Loop Detected](https://getuptimely.com/errors/508)

The server aborted a request because it was going round in circles — usually a redirect or rewrite loop.

## Cloudflare origin errors (52x)

Cloudflare's own codes, not HTTP standards. Each says something specific about the leg between the edge and your origin.

### [Cloudflare 520 Web Server Returns an Unknown Error](https://getuptimely.com/errors/520)

Cloudflare reached your origin and got back a response it could not use: empty, malformed or cut off.

### [Cloudflare 521 Web Server Is Down](https://getuptimely.com/errors/521)

Cloudflare reached your origin and the origin refused the connection outright.

### [Cloudflare 522 Connection Timed Out](https://getuptimely.com/errors/522)

Cloudflare tried to connect to your origin and got no answer at all before giving up.

### [Cloudflare 523 Origin Is Unreachable](https://getuptimely.com/errors/523)

Cloudflare could not route to your origin at all — usually a DNS record pointing at nothing.

### [Cloudflare 524 A Timeout Occurred](https://getuptimely.com/errors/524)

Cloudflare connected to your origin and sent the request, and the origin took longer than 125 seconds to respond.

### [Cloudflare 525 SSL Handshake Failed](https://getuptimely.com/errors/525)

Cloudflare reached your origin but could not complete the TLS handshake with it.

### [Cloudflare 526 Invalid SSL Certificate](https://getuptimely.com/errors/526)

Cloudflare reached your origin over HTTPS and rejected the certificate it presented.

## Network and TLS failures

Failures with no status code at all, because the request never got far enough for a response to exist. These are what a monitor reports when nothing answered.

### [NXDOMAIN (DNS name not found)](https://getuptimely.com/errors/dns-nxdomain)

The DNS resolver answered definitively that the name does not exist — before any connection was attempted.

### [Connection refused (ECONNREFUSED)](https://getuptimely.com/errors/connection-refused)

The host answered the connection attempt with an explicit rejection — nothing is listening on that port.

### [Connection timeout (ETIMEDOUT)](https://getuptimely.com/errors/connection-timeout)

The connection attempt got no answer at all and the client eventually gave up.

### [SSL certificate expired](https://getuptimely.com/errors/ssl-certificate-expired)

The certificate's validity period has passed, so every client refuses the connection.

### [SSL/TLS handshake failed](https://getuptimely.com/errors/ssl-handshake-failed)

An SSL handshake failed or TLS handshake failure means the TCP connection succeeded and the TLS negotiation on top of it did not.

### [Connection reset by peer (ECONNRESET)](https://getuptimely.com/errors/econnreset)

An established connection was abruptly terminated by the other end, mid-exchange.

A code you were looking for and did not find? Email **support@getuptimely.com**. To be told when one of these starts happening to your own service, [Uptimely checks every minute on the free plan](https://getuptimely.com/pricing).
