)]}'
{"glance/api/v2/images.py":[{"author":{"_account_id":17116,"name":"Niall Bunting","email":"niall.bunting@hpe.com","username":"NiallBunting"},"change_message_id":"7d16844e6ac3d44958ccb50eccf4952f9373fef2","unresolved":false,"context_lines":[{"line_number":672,"context_line":"        try:"},{"line_number":673,"context_line":"            params \u003d request.params.copy()"},{"line_number":674,"context_line":"        except UnicodeDecodeError:"},{"line_number":675,"context_line":"            msg \u003d _(\u0027Error decoding.\u0027)"},{"line_number":676,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":677,"context_line":""},{"line_number":678,"context_line":"        limit \u003d params.pop(\u0027limit\u0027, None)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a8ffd7b_600a1b28","line":675,"updated":"2015-12-03 11:41:29.000000000","message":"I feel \"Error decoding\" could be a bit too general and hard to interpret as a user, is it possible to have a slightly more specific message?","commit_id":"7ae9629c947423ead8fa484dd02c0f8494f23062"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"bbbd14a6c8cebd817f67851843ecbf7d59b1ab4d","unresolved":false,"context_lines":[{"line_number":672,"context_line":"        try:"},{"line_number":673,"context_line":"            params \u003d request.params.copy()"},{"line_number":674,"context_line":"        except UnicodeDecodeError:"},{"line_number":675,"context_line":"            msg \u003d _(\u0027Error decoding.\u0027)"},{"line_number":676,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":677,"context_line":""},{"line_number":678,"context_line":"        limit \u003d params.pop(\u0027limit\u0027, None)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a8ffd7b_8c1df174","line":675,"in_reply_to":"9a8ffd7b_600a1b28","updated":"2015-12-03 14:04:19.000000000","message":"I agree with Niall about improving the error message.\n\nAlso, I wonder whether there are other exceptions we should be looking for here, or maybe a more general exception?  As you noted in the bug, if a different exception is raised here, it\u0027s not caught anywhere else in a graceful fashion, instead it results in a 500.","commit_id":"7ae9629c947423ead8fa484dd02c0f8494f23062"}],"glance/common/wsgi.py":[{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"6722219aaf94c95d0910d82a8288dafc3266976d","unresolved":false,"context_lines":[{"line_number":888,"context_line":"            exc_info \u003d sys.exc_info()"},{"line_number":889,"context_line":"            e \u003d translate_exception(request, e)"},{"line_number":890,"context_line":"            six.reraise(type(e), e, exc_info[2])"},{"line_number":891,"context_line":"        except UnicodeDecodeError:"},{"line_number":892,"context_line":"            msg \u003d _(\"Error decoding. Introduced non-\u0027URL encoding\u0027 characters\")"},{"line_number":893,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":894,"context_line":"        except Exception as e:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a7e1126_15ec8f28","line":891,"updated":"2015-12-22 02:22:28.000000000","message":"What about catching `UnicodeError` here? I believe this was proposed in the previous patchset. I\u0027m not sure if that\u0027d end up catching errors we don\u0027t want to catch here.","commit_id":"0120d2b4760518221fce1f1da1c3cda9dc773faf"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"6722219aaf94c95d0910d82a8288dafc3266976d","unresolved":false,"context_lines":[{"line_number":889,"context_line":"            e \u003d translate_exception(request, e)"},{"line_number":890,"context_line":"            six.reraise(type(e), e, exc_info[2])"},{"line_number":891,"context_line":"        except UnicodeDecodeError:"},{"line_number":892,"context_line":"            msg \u003d _(\"Error decoding. Introduced non-\u0027URL encoding\u0027 characters\")"},{"line_number":893,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":894,"context_line":"        except Exception as e:"},{"line_number":895,"context_line":"            LOG.exception(_LE(\"Caught error: %s\"), six.text_type(e))"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a7e1126_f5f463f1","line":892,"updated":"2015-12-22 02:22:28.000000000","message":"How do you know it was the URL containing the non-decodable characters? What if it\u0027s something else that failed to parse/decode ?\n\nPerhaps an even more generic error could be used:\n\n\"Error decoding your request. Either the URL or the request body contained characters that could not be decoded by Glance.\"","commit_id":"0120d2b4760518221fce1f1da1c3cda9dc773faf"},{"author":{"_account_id":16658,"name":"Darja Shakhray","email":"damalyavkina@gmail.com","username":"dshakhray"},"change_message_id":"2f9290a154106978eeba7ef130529270e34ec2f8","unresolved":false,"context_lines":[{"line_number":889,"context_line":"            e \u003d translate_exception(request, e)"},{"line_number":890,"context_line":"            six.reraise(type(e), e, exc_info[2])"},{"line_number":891,"context_line":"        except UnicodeDecodeError:"},{"line_number":892,"context_line":"            msg \u003d _(\"Error decoding. Introduced non-\u0027URL encoding\u0027 characters\")"},{"line_number":893,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":894,"context_line":"        except Exception as e:"},{"line_number":895,"context_line":"            LOG.exception(_LE(\"Caught error: %s\"), six.text_type(e))"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a7e1126_74570758","line":892,"in_reply_to":"3a7e1126_f5f463f1","updated":"2015-12-22 12:08:08.000000000","message":"Done","commit_id":"0120d2b4760518221fce1f1da1c3cda9dc773faf"}]}
