-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide compete Atlas api response in exceptions #36
Comments
Instead of always including the full response by default, I have added the ability to see this output at an elevated logging level. I have also added a brief documentation note on how to use logging levels: https://mongodb-labs.github.io/drivers-atlas-testing/installing-running-locally.html#debugging Just use the 'debug' logging level and you will see the full request and response. For example:
|
The complete response is not provided. Example: https://gist.github.com/p-mongo/6711c5f08e2926b3cd4ab825876e828b I have a patch as follows that I am using: carbon% git diff diff --git a/atlasclient/client.py b/atlasclient/client.py index d0d8a09..01a9d6a 100644 --- a/atlasclient/client.py +++ b/atlasclient/client.py @@ -257,5 +257,6 @@ class AtlasClient: if response.status_code == 409: raise AtlasApiError('409: Conflict.', **kwargs) + print(response.content) raise AtlasApiError('{}: Unknown.'.format(response.status_code), **kwargs) This patch produces the following line in the linked gist: b'{"detail":"Unexpected error.","error":500,"errorCode":"UNEXPECTED_ERROR","parameters":[],"reason":"Internal Server Error"}' The remainder of the gist (which is output produced by unpatched astrolabe) does not include the |
Works correctly after I updated my tree. |
I am currently getting the following error from astrolabe:
If I inspect the response returned by the api, I see this:
As a user of Astrolabe I would like Astrolabe to include all information that api returns into its exceptions so that I can effectively troubleshooting errors.
The text was updated successfully, but these errors were encountered: