mirror of
https://github.com/mbirth/tcl_ota_check.git
synced 2024-11-10 06:16:46 +00:00
Throw human readable exception for 404 errors.
This commit is contained in:
parent
237280cbea
commit
f1071509db
@ -87,6 +87,8 @@ class FotaCheck:
|
||||
return req.text
|
||||
elif req.status_code == 204:
|
||||
raise requests.exceptions.HTTPError("No update available.", response=req)
|
||||
elif req.status_code == 404:
|
||||
raise requests.exceptions.HTTPError("No data for requested CUREF/FV combination.", response=req)
|
||||
elif req.status_code in (500, 503):
|
||||
raise requests.exceptions.HTTPError("Server busy, try again later.", response=req)
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user