top | item 41482264

(no title)

thezilch | 1 year ago

That's ... not what most people are doing. People send _application_ errors on HTTP 200 response codes, because HTTP response codes are for HTTP and not applications. Most "REST" libraries and webdev get this wrong, building ever more fragile web services.

discuss

order

ChocolateGod|1 year ago

Applications using status codes is useful because it can tell browsers and load balancers to not cache the page in a uniform way.

sunshowers|1 year ago

I don't think the distinction is as clear-cut as you're making it out to be.

For example, HTTP 409 Conflict generally means an application-level conflict (e.g. an optimistic concurrency mechanism detected a conflict).

HTTP 422 Unprocessable Entity is also usually an application-level error (e.g. hash validation failure, or identifier not recognized by the server).

LoganDark|1 year ago

Task failed successfully