HTTP Status Codes

Cluster focuses on debates about the proper use of HTTP status codes for error handling in web APIs and servers, criticizing misuse like 200 for errors or incorrect 4xx/5xx distinctions, and suggesting alternatives like 400, 410, 418, or 451.

📉 Falling 0.2x Web Development
3,368
Comments
20
Years Active
5
Top Authors
#8449
Topic ID

Activity Over Time

2007
3
2008
14
2009
21
2010
28
2011
111
2012
150
2013
186
2014
117
2015
199
2016
132
2017
225
2018
133
2019
190
2020
218
2021
257
2022
482
2023
380
2024
312
2025
197
2026
13

Keywords

TL US OK mozilla.org UX SHOULD DR PLEASE E.g POST error 404 http codes status code body errors request response

Sample Comments

ravenstine Dec 8, 2024 View on HN

Not sure why they can't return a more appropriate HTTP code.

Marazan Jul 18, 2022 View on HN

There's.... There is a whole.set of status codes for exactly those things!

oneeyedpigeon Oct 19, 2013 View on HN

Doesn't the correct use of HTTP status codes cover 99% of these cases?

afandian Apr 16, 2024 View on HN

You're saying some of the 404s should be 400s.

techdragon Jun 7, 2022 View on HN

I’d prefer HTTP 442 “Oh no, not again.”

mariojv Apr 1, 2023 View on HN

I wonder if they considered using the 451 status code.

0xffff2 Nov 3, 2023 View on HN

Isn't that what 40x errors are for? E.g. I think there's 408 Bad Request for your POST example.

mesozoic Jul 13, 2022 View on HN

Have they never heard of codes other than 2xx and 4xx?

unethical_ban Dec 21, 2015 View on HN

4xx errors are supposed to be client-side errors. 5xx is server-side. The purpose of the code doesn't match the spec.

stock_toaster Sep 2, 2013 View on HN

Wouldn't "return 410" (potentially) be better?