Currently HTTPClient class sets the 'force_exception_to_status_code'
instance variable to True. This actually leads to the next problem:
there is no way to distinguish between errors which have the same
status code. E. g. both SSL handshake error and a general Bad Request
error have status code 400, and the only way to distinguish between them
is to analyze the error message content, that is both error-prone and ugly.
The proposed solution:
- leaves the 'force_exception_to_status_code' set to False
- adds a try/except wrapper for the request() call to handle
httplib2 exceptions (e. g. host not found, socket timeout, etc)
Blueprint: quantum-client-ssl
Change-Id: Ib168fadc67568d5d6247f7addbe731e8832a39de
1.9 KiB
1.9 KiB