Hacker News new | past | comments | ask | show | jobs | submit login

Obviously a bad server state should be 500



Yeah, from what I understand 400 means "fix it at the client's end" and 500 means "fix it at the server's end" which seems to be what the RFC thinks, too:

https://httpwg.org/specs/rfc9110.html#overview.of.status.cod...

> The 4xx (Client Error) class of status code indicates that the client seems to have erred.

> The 5xx (Server Error) class of status code indicates that the server is aware that it has erred or is incapable of performing the requested method.


Basically, 4xx is telling the client you did something wrong (such as visit a non-existent URL), 5xx is when the server errors and can't respond appropriately.


Obvious to you and me. Server team disagreed and tried 422 unprocessable entity, which is not correct. My point is that these issues should be clear enough that there are not thousands of StackOverflow questions on it, and debates between teams. “It’s so easy” is not true. There are layers of understanding.


They are clear, the server team is objectively wrong




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: