Http Status Crisis

1 minute read

The Existential Crisis of HTTP Status Codes

After years of building REST APIs, I’ve come to believe that HTTP status codes are a collective delusion we’ve all agreed to maintain. Everyone pretends that 409 Conflict has a specific meaning, but I’ve seen it used for everything from “username already taken” to “the moon is in the wrong phase for this operation.” It’s like we have this detailed taxonomy of failures but everyone just uses 400, 404, and 500 for everything.

The worst is 418 “I’m a teapot” - an April Fool’s joke that somehow made it into actual RFC documentation and now sits there, forever, like that one friend who stayed too long at the party and now lives on your couch. I’ve actually seen production systems return 418 for rate limiting because some developer thought they were being clever. The HTTP spec is basically a suggestion box that everyone ignores while pretending to follow religiously.

My personal favorite is the philosophical debate about whether a successful DELETE should return 200 or 204. If you delete something and return 204 No Content, are you saying there’s no content because you successfully deleted it, or because there’s literally no response body? I’ve watched senior engineers argue about this for hours like medieval theologians debating how many angels can dance on a pin header.

Updated: