HTTP StatusCodes should be obsoleted but be still useful.
Your API's Status Codes Matter More Than You Think.
Here is my structured approach to returning them right.
Returning the wrong HTTP status code in your API responses can break integrations, mislead clients, and make debugging a nightmare.
200 OK for an error? -> Your client thinks everything is fine when it's not.
400 Bad Request instead of 422 Unprocessable Entity? -> You're signaling a malformed request when the issue is with the data itself.
404 Not Found instead of 403 Forbidden? -> Now it looks like the resource doesn’t exist when access is just restricted.
Status codes aren’t just numbers. They define how systems interact.
Get them right.
P.S. Do you know what the 202 is used for?