Consider renaming HTTPError
to RequestError
#1064
Labels
user-experience
Ensuring that users have a good experience using the library
HTTPError
to RequestError
#1064
Spun up from #867
Currently
httpx.HTTPError
serves as a base exception class, no problem. (In 0.13.x it wasn't the case because HTTPCore could raise independant exception due to a lack of mapping, but this was fixed via #1044 and #1045.)However with #949 and 1.0 in mind, I think there's a case to be made for this exception to be renamed to something else, most likely
httpx.RequestError
.The motivation discussed in #867 was to make
.raise_from_status()
raise a dedicatedHTTPStatusError
exception, different from the base class. (There's an implementation of this in in #869.) I think it's a valid use case.But either way another reason why I think
HTTPError
might not be ideal is that it's very close but different fromHTTPXError
, which feels a bit misleading (has an "isn't it a typo?" kind of vibe to it).So, should we switch to
httpx.RequestError
?The text was updated successfully, but these errors were encountered: