mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-06-18 15:28:12 +00:00
ValueError not RuntimeError
This commit is contained in:
@ -400,7 +400,7 @@ def _check_status(response):
|
|||||||
Check the response code is a 2xx (raise an exception otherwise)
|
Check the response code is a 2xx (raise an exception otherwise)
|
||||||
"""
|
"""
|
||||||
if response.status_code < 200 or response.status_code >= 300:
|
if response.status_code < 200 or response.status_code >= 300:
|
||||||
raise RuntimeError(
|
raise ValueError(
|
||||||
"Expected a 2xx code, got {}".format(response.status_code)
|
"Expected a 2xx code, got {}".format(response.status_code)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user