Skip to content
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

[Client] Improve HTTP error log #671

Open
animeshk08 opened this issue May 26, 2020 · 1 comment · May be fixed by #672
Open

[Client] Improve HTTP error log #671

animeshk08 opened this issue May 26, 2020 · 1 comment · May be fixed by #672

Comments

@animeshk08
Copy link
Contributor

Current if an HTTP error is thrown by an API the log print error.response.reason as a result of

response.raise_for_status()

However, many times the actual reason for the error is returned in ``error.response.text`. A log message can be printed in case an exception is thrown. This will help users to easily debug the error and also possibly avoid the need of such checks:

if not group_download_archive:

if error.response.status_code == 404 and str(error.response.reason).upper() == 'NOT FOUND':

@animeshk08 animeshk08 linked a pull request May 27, 2020 that will close this issue
@valeriocos
Copy link
Member

Thank you @animeshk08 for opening this issue and providing the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants