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.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
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.