Express 5 · Routing
Send a status and JSON
Set the status code and send a JSON response.
res.status(404).json({ error: "Not found" });
Official Express 5 documentation
Express 5 · Routing
Set the status code and send a JSON response.
res.status(404).json({ error: "Not found" });
Official Express 5 documentation
Was this page helpful?