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

Enhanced error handling #30

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

izurietajr
Copy link

This PR shows a user friendly error message when a request has no response

Errors were not handled and when a server was not available the python error message would take the whole window, this fixes the problem and shows details of three types of errors: Timeout, TooManyRedirects and RequestException errors.

When an exception happens, the buffer shows a message detailing the error type and request info:

Request exception
Request data:

Method:   GET
Path:     /api/v1/companies/
Headers:  {'User-Agent': 'python-requests/2.23.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Authorization': 'Token XXXXXXX'}
Body:     None
Response: None

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

Successfully merging this pull request may close these issues.

None yet

1 participant