better messaging of exceptions
This commit is contained in:
parent
02c040865d
commit
1c96ea9ab1
|
@ -221,10 +221,13 @@ def handle_cis_response(response):
|
||||||
:param response:
|
:param response:
|
||||||
:return:
|
:return:
|
||||||
"""
|
"""
|
||||||
if response.status_code > 399:
|
|
||||||
raise Exception(response.text)
|
|
||||||
|
|
||||||
return response.json()
|
return response.json()
|
||||||
|
if response.status_code == 404:
|
||||||
|
raise Exception("DigiCert: Order not in issued state.")
|
||||||
|
elif response.status_code == 406:
|
||||||
|
raise Exception("DigiCert: Wrong Header")
|
||||||
|
elif response.status_code > 399:
|
||||||
|
raise Exception("DigiCert rejected request with the error:" + response.text)
|
||||||
|
|
||||||
|
|
||||||
@retry(stop_max_attempt_number=10, wait_fixed=10000)
|
@retry(stop_max_attempt_number=10, wait_fixed=10000)
|
||||||
|
|
Loading…
Reference in New Issue