502 Bad Gateway

Look up a status, pick the right one for an API, or hit a live endpoint that actually returns it. Add ?code=418 to this URL and the response is that status — useful for curl, interceptors, and “what does my client do on 503?” Nothing here phones home except the Try it fetch to this same page.

Which class?

502

Bad Gateway

Server error · RFC 9110

This server, acting as a gateway or proxy, got an invalid response from upstream.

When to use

Reverse proxies when the origin sent garbage, RST, or an empty reply.

Don’t

Your own unhandled exception is 500. Origin down/overloaded is often 503 or 504.

Live URL

curl -i https://corecoding.com/utilities/http-status.php?code=502


    

Code use cases