Which HTTP Error Code Should I Return?
Embed This Widget
Add the script tag and a data attribute to embed this widget.
Embed via iframe for maximum compatibility.
<iframe src="https://statuscodefyi.com/iframe/entity//" width="420" height="400" frameborder="0" style="border:0;border-radius:10px;max-width:100%" loading="lazy"></iframe>
Paste this URL in WordPress, Medium, or any oEmbed-compatible platform.
https://statuscodefyi.com/entity//
Add a dynamic SVG badge to your README or docs.
[](https://statuscodefyi.com/entity//)
Use the native HTML custom element.
Use this decision tree to select the correct HTTP error status code for your API or web application. Answer a series of yes/no questions about the nature of the request and what went wrong. Covers all common client errors (4xx) and server errors (5xx).
Decision Steps
Is the request itself syntactically malformed or missing required fields?
Does the endpoint require authentication and the request provides no credentials (or clearly invalid ones)?
Are the credentials valid but the user lacks permission to access this resource?
Does the requested resource not exist?
Does the resource exist but the HTTP method (e.g., DELETE, PUT) is not supported on it?
Would the request cause a conflict with the current state of the resource (e.g., duplicate entry, edit conflict)?
Is the request well-formed but contains semantic validation errors (e.g., invalid field values, business rule violations)?
Has the client exceeded a rate limit or quota?
Did an unexpected error occur inside your server (bug, unhandled exception)?