)]}'
{"monascaclient/common/http.py":[{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"d52da401c3978b08db2addcdde379bad44d932f9","unresolved":false,"context_lines":[{"line_number":123,"context_line":"            _ksclient \u003d ksclient.KSClient(**ks_args)"},{"line_number":124,"context_line":"            self.auth_token \u003d _ksclient.token"},{"line_number":125,"context_line":"        except Exception as e:"},{"line_number":126,"context_line":"            raise exc.KeystoneException(e)"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"    def log_curl_request(self, method, url, kwargs):"},{"line_number":129,"context_line":"        curl \u003d [\u0027curl -i -X %s\u0027 % method]"}],"source_content_type":"text/x-python","patch_set":3,"id":"dae33548_0c9528dd","line":126,"range":{"start_line":126,"start_character":18,"end_line":126,"end_character":21},"updated":"2016-02-16 22:09:56.000000000","message":"Are you sure you always want to raise a KeystoneException? Could it be the case that another exception might be more appropriate sometimes?\n\nFor example, could an http exception be caused by trying to use Keystone and if so, should that be reported as an HttpException.","commit_id":"08e42342bfd000e58ddfa1a94025613be88461c7"},{"author":{"_account_id":18179,"name":"Kaiyan Sheng","email":"kaiyan.sheng@hpe.com","username":"kaiyan-sheng"},"change_message_id":"6c478f14dc5a169297ab7cec98733d93b4f61fe8","unresolved":false,"context_lines":[{"line_number":123,"context_line":"            _ksclient \u003d ksclient.KSClient(**ks_args)"},{"line_number":124,"context_line":"            self.auth_token \u003d _ksclient.token"},{"line_number":125,"context_line":"        except Exception as e:"},{"line_number":126,"context_line":"            raise exc.KeystoneException(e)"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"    def log_curl_request(self, method, url, kwargs):"},{"line_number":129,"context_line":"        curl \u003d [\u0027curl -i -X %s\u0027 % method]"}],"source_content_type":"text/x-python","patch_set":3,"id":"dae33548_3beae00f","line":126,"range":{"start_line":126,"start_character":18,"end_line":126,"end_character":21},"in_reply_to":"dae33548_0c9528dd","updated":"2016-02-17 00:38:23.000000000","message":"Thank you Roland! I think knowing if there is an exception raised by keystone is very import to us. Even if it\u0027s an http exception by trying to use keystone, raise it as keystone exception first then we can also go back to the log to find more info. Do you think this is ok?","commit_id":"08e42342bfd000e58ddfa1a94025613be88461c7"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"cbe4a6c9a0a0c8240e6a94ba9d28de1e7f73854d","unresolved":false,"context_lines":[{"line_number":123,"context_line":"            _ksclient \u003d ksclient.KSClient(**ks_args)"},{"line_number":124,"context_line":"            self.auth_token \u003d _ksclient.token"},{"line_number":125,"context_line":"        except Exception as e:"},{"line_number":126,"context_line":"            raise exc.KeystoneException(e)"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"    def log_curl_request(self, method, url, kwargs):"},{"line_number":129,"context_line":"        curl \u003d [\u0027curl -i -X %s\u0027 % method]"}],"source_content_type":"text/x-python","patch_set":3,"id":"dae33548_44e6a9b0","line":126,"range":{"start_line":126,"start_character":18,"end_line":126,"end_character":21},"in_reply_to":"dae33548_3beae00f","updated":"2016-02-17 20:55:25.000000000","message":"I probably could have been more clear.\n\nIn the case that you are invoking\n\n_ksclient \u003d ksclient.KSClient(**ks_args)\n\nis there a more specific exception that is thrown if an http exception occurs. Specifically, would code along the lines of:\n\ntry:\n    _ksclient \u003d ksclient.KSClient(**ks_args)\n    self.auth_token \u003d _ksclient.token\nexcept HTTPException as e:\n    raise exc.HTTPException(e)\nexcept Exception as e:\n    raise exc.KeystoneException(e)\n\nNote, I don\u0027t know the specific exceptions that are possible from the ksclient. If those details are documented somewhere then it might be worth doing something similar to the above.","commit_id":"08e42342bfd000e58ddfa1a94025613be88461c7"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"d52da401c3978b08db2addcdde379bad44d932f9","unresolved":false,"context_lines":[{"line_number":228,"context_line":""},{"line_number":229,"context_line":"    def _unauthorized(self, resp):"},{"line_number":230,"context_line":"        status401 \u003d (resp.status_code \u003d\u003d 401)"},{"line_number":231,"context_line":"        status500 \u003d (resp.status_code \u003d\u003d 500 and \"(HTTP 401)\" in resp.content)"},{"line_number":232,"context_line":"        return status401 or status500"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"    def _check_status_code(self, resp, method, **kwargs):"}],"source_content_type":"text/x-python","patch_set":3,"id":"dae33548_ac5a3c4e","line":231,"range":{"start_line":231,"start_character":18,"end_line":231,"end_character":19},"updated":"2016-02-16 22:09:56.000000000","message":"Interesting that an internal server error can really be an unauthorized and a 401 is in the response.","commit_id":"08e42342bfd000e58ddfa1a94025613be88461c7"}]}
