404 Not Found JSON response example
Last updated 2026-05-20
Example JSON
Returned when /products/<id> or /users/<id> does not match anything.
{
"status": 404,
"error": "Not Found",
"message": "Product with id 9999 was not found",
"code": "resource_not_found",
"resource": "product",
"id": 9999
}Request examples
const res = await fetch('https://jsonexamples.com/http/404/Resource+not+found');
if (!res.ok) {
const err = await res.json();
console.error(res.status, err.message);
}Try the live endpoint
Click below to call /http/404/Resource+not+found from your browser.
GET
/http/404/Resource+not+found{
"hint": "Click 'Run' to call the live endpoint"
}Common variations
Path-not-found variant
{
"status": 404,
"error": "Not Found",
"message": "No route matches GET /unknown-path",
"code": "path_not_found"
}Convert this JSON
Generated starting points for TypeScript, JSON Schema, and Zod. Refine before shipping to production.
export interface 404NotFound {
"status": number;
"error": string;
"message": string;
"code": string;
"resource": string;
"id": number;
}