I am using fetch_token
with the standard web client, but the server I am talking to returns a non-standard response (its just a text string saying 403/ bad auth ...
).
The error I see is a MissingTokenError
, rather than something more explanatory. This left me chasing my tail since I thought there was something wrong with the response, etc.
Ideas:
- In the 403 case, re-raise that as an explicit error
- In the "unexpected body" or "bad format", raise a
BadResponseError
or similar
- Add status_code/resp.text to the exception as well, to help with debugging