Closed dowski closed 4 years ago
I noticed that if I call StatsAPI's get method and the server returns a 5xx error, the StatsAPI code raise a ValueError.
get
ValueError
Would you be open to allowing Requests to raise an HTTPError instead? It's directly supported by the Requests API:
HTTPError
r.raise_for_status()
I think that the HTTPError would make it more clear to callers what went wrong. If it sounds good I'll send a small pull request.
That makes sense to me. Go for it!
I noticed that if I call StatsAPI's
get
method and the server returns a 5xx error, the StatsAPI code raise aValueError
.Would you be open to allowing Requests to raise an
HTTPError
instead? It's directly supported by the Requests API:I think that the
HTTPError
would make it more clear to callers what went wrong. If it sounds good I'll send a small pull request.