by dtertman · 4y ago · 0 comments
Because most people abuse status codes, most tooling is built around status codes. All of the Java HTTP libraries, for instance, throw very nice and easily-handle-able exceptions for non-200 status codes, but do nothing at all for 200 codes. So, now, we need to:
* try/catch the call anyway, because it might fail * parse the result * figure out if the result is an error or OK * throw / return early from error results * separate that throw from the try above
It's all so much hassle to avoid a mistake that _client libraries don't make_ : using the wrong URL in the first place.
No comments yet.