ValueError not RuntimeError

This commit is contained in:
meejah 2019-08-08 15:33:21 -06:00
parent e7c387a7fc
commit 9b3d37e03e

View File

@ -400,7 +400,7 @@ def _check_status(response):
Check the response code is a 2xx (raise an exception otherwise)
"""
if response.status_code < 200 or response.status_code >= 300:
raise RuntimeError(
raise ValueError(
"Expected a 2xx code, got {}".format(response.status_code)
)