5 ms·
A lot of client libraries throw exceptions when a non-200 status code is returned, something that plenty of newbies and not-so-great developers struggle with.
by mootothemax 11y ago
A lot of client libraries throw exceptions when a non-200 status code is returned, something that plenty of newbies and not-so-great developers struggle with.
I imagine that always returning 200 drastically cuts down on support costs and basically-irrelevant forum posts, regardless of the technical rights and wrongs of doing so.
- peteretep 11y agoI wonder if IE still throws its custom error pages if a document under a certain size is returned with an error code.
- darkhorn 11y agoMicrosoft Edge 25 behaves same.
- rickycook 11y agoan exception is better than a silent failure in almost all situations. this is an argument for not using 200 for all; not against
- mootothemax 11y ago>an exception is better than a silent failure in almost all situations. >this is an argument for not using 200 for all; not against The practical side of me disagrees. Experience bears out that plenty of developers are at a loss when e.g. a login callback page shows an unhandled exception error despite error-checking code being in place and running against the response's "error" node or whatever is used. The problem is that there just aren't enough people out there that can understand the entire stack, and the end result is that people who've paid (good/bad) money for development - and their end users - end up with services that'd otherwise be decently functional showing the odd exception error instead. (the technical side of me agrees with you absolutely!)