HTTP 404 error
An HTTP 404 Not Found response indicates that the server did not find a current representation of the requested resource or is unwilling to disclose that one exists.
ASP.NET Core in Action, 3e
The HTTP 404 status code indicates that the server cannot find the resource or endpoint identified by the request path.
- How it is used
- Signals an unmatched URL or missing requested item and guides API responses and user-facing error pages.
- How deep it goes
- Explains when 404 occurs and compares API results with status-code-page handling; leaves the missing-item convention open to debate.
- Examples
- Uses a fruit lookup with a missing ID, a Swagger UI request exposing an undocumented 404, and a re-executed /404 page.
- What you can do after
- Apply it via Results.NotFound() or NotFound() for missing items, and configure StatusCodePagesMiddleware for user-facing error pages.
Read how ASP.NET Core in Action, 3e explains HTTP 404 error →
Django in Action
HTTP 404 Not Found is an HTTP response status indicating that the requested resource could not be found.
- How it is used
- Handles public URLs that request missing database objects by returning a standard not-found response.
- How deep it goes
- Explains lookup, exception conversion, response handling, customization, and status-code testing, but not HTTP protocol internals.
- Examples
- Uses musician IDs, the Steve Vai detail page, nonexistent ID 100, and a test request for nonexistent ID 10.
- What you can do after
- Diagnose missing-resource behavior and test it by asserting that a Django client response has status code 404.
The Design of Web APIs, Second Edition
404 is the HTTP status code indicating that the requested resource could not be found.
- How it is used
- Signals that a path-identified resource is unavailable, supporting predictable API behavior and client-side error handling.
- How deep it goes
- Explains resource absence, distinguishes 404 from 204 and 400, and extends the choice to permission-related disclosure.
- Examples
- Uses nonexistent products, DELETE requests, OpenAPI response definitions, and inaccessible bank accounts.
- What you can do after
- Apply 404 in HTTP and OpenAPI responses when resources are absent or their existence must remain undisclosed.
Read how The Design of Web APIs, Second Edition explains HTTP 404 error →
Related concepts
- HTTP response codekind of · An HTTP status code is a standardized three-digit value in an HTTP response that indicates the outcome of processing the corresponding request.
- 403 Forbiddencontrasts with · 403 Forbidden is an HTTP response status indicating that the server understood a request but refuses to authorize the requested access or operation.
- web API action methodproduced by · A web API action method is a controller method associated with a matched HTTP request that processes it and produces a response.
- endpointcontrasts with · An endpoint is a network-accessible address or interface through which a service exposes a resource or operation and handles requests and responses.
- middlewareproduced by · Middleware is an intermediate software component or layer that processes or mediates requests, messages, or operations between other components, often adding behavior or controlling their flow.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.


