Currently Client.api_get assumes the response it retrieves is a success. There should be error checking like if response.status_code != 200: raise HttpError().
( Avoid response.raise_for_status(), which only raises an error for definitely-error codes. For your API, you know that if you receive anything other than 200 then something has gone wrong.)
Currently
Client.api_get
assumes the response it retrieves is a success. There should be error checking likeif response.status_code != 200: raise HttpError()
.( Avoid
response.raise_for_status()
, which only raises an error for definitely-error codes. For your API, you know that if you receive anything other than 200 then something has gone wrong.)