vim-http-client
vim-http-client copied to clipboard
Enhanced error handling
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