Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

lucianonascimento's avatar

HTTP Status Codes

I would like to know if you guys really use each http status code when you develop API's, cause I noticed that there are many API's that just use 404 when something goes wrong (ALL/ALMOST ALL cases). If I remember well there is a video here talking about that. Let me you know your opinion about that.

0 likes
8 replies
Sinnbeck's avatar

Making me able to simply look up a code quickly and see what when wrong (or just recall it from memory) is alot better than being expected to see some homemade error string that might be hard to decode.

An example is 429. I instantly know it its too many requests (instead of guessing the meaning of "you are too eager" or some other random text)

1 like
Sinnbeck's avatar

Oh yes agreed. I mean when using some external api. If they return a 404 code when the error is something else. By just looking at an error code, I often know the error instantly

2 likes
automica's avatar
automica
Best Answer
Level 54

yup. Following convention is much easier for everybody.

1 like

Please or to participate in this conversation.