)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"be6a0e832dc9ef94c659ff2586182a09692a6004","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add try except in the decorator to let the image form display the error we want"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When creating a image, select an empty file and the error message is incorrect."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: I087aa91b0740415328f124240bacd8c4e80ba07b"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5fc1f717_697d3c1b","line":10,"updated":"2019-03-07 09:27:46.000000000","message":"A bug report is needed.","commit_id":"d4768ccff2a2d5da684d31a6c30b14afae604208"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":37632,"name":"Dmitriy Chubinidze","email":"dcu995@gmail.com","username":"chubinidzedr"},"change_message_id":"ab184e75b8e4aca4759e2a4db8cc759b58a30ecb","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"9407c85d_f6ab068e","updated":"2025-05-23 07:30:39.000000000","message":"LGTM","commit_id":"48d1360994b28920d78f020f70b3b4db5847e7d8"}],"openstack_dashboard/api/rest/utils.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"894ee096ea731360380649adb970215cbd5f5a90","unresolved":false,"context_lines":[{"line_number":200,"context_line":"            else:"},{"line_number":201,"context_line":"                LOG.exception(\u0027HTTP exception with no status/code\u0027)"},{"line_number":202,"context_line":"                return JSONResponse(str(e), 500)"},{"line_number":203,"context_line":"            return JSONResponse(str(e), http_status)"},{"line_number":204,"context_line":"        except Exception as e:"},{"line_number":205,"context_line":"            LOG.exception(\u0027error invoking apiclient\u0027)"},{"line_number":206,"context_line":"            return JSONResponse(str(e), 500)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5fc1f717_299e5463","line":203,"updated":"2019-03-07 09:27:19.000000000","message":"How about the following logic?\nThis addresses two points:\n- Simplify the logic\n- Avoid using hasattr() (I forgot the real pointer on why we should avoid hasattr... sorry)\n\n  for attr in [....]:\n      try:\n          http_status \u003d getattr(e, attr)\n          return JSONResponse(str(e), http_status)\n      except AttributeError:\n          continue\n  else:\n      LOG.exception(....)\n      return JSONResponse(str(e), 500)","commit_id":"d4768ccff2a2d5da684d31a6c30b14afae604208"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"f01b6aa817d1cfa9ce51d85af3d549f2d154ee7f","unresolved":false,"context_lines":[{"line_number":200,"context_line":"                except AttributeError:"},{"line_number":201,"context_line":"                    continue"},{"line_number":202,"context_line":"            else:"},{"line_number":203,"context_line":"                LOG.exception(\u0027HTTP exception with no status/code\u0027)"},{"line_number":204,"context_line":"                return JSONResponse(str(e), 500)"},{"line_number":205,"context_line":"        except Exception as e:"},{"line_number":206,"context_line":"            LOG.exception(\u0027error invoking apiclient\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5fc1f717_7feab7ac","line":203,"updated":"2019-03-08 06:52:25.000000000","message":"Isn\u0027t it better to include an exception information in the log message?","commit_id":"0024c7dcae91f8f5370711e096308ce3ed1e18cd"}]}
