DEV Community

Discussion on: 404 status code! Really?

Collapse
 
buinauskas profile image
Evaldas Buinauskas • Edited

404 all the way. It's client error because it didn't supply correct ID.

If a message is needed, RFC suggests using object type called problem details. It is standard type to transfer error messages and it can be extended to contain additional information 🙂

My rule of thumb is that an endpoint should only have a single successful response type and code.