)]}'
{"cinder/db/sqlalchemy/api.py":[{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"da30a3a994de7859d0a401630e996b0c22cc069e","unresolved":false,"context_lines":[{"line_number":1675,"context_line":"@require_context"},{"line_number":1676,"context_line":"def volume_update(context, volume_id, values):"},{"line_number":1677,"context_line":"    session \u003d get_session()"},{"line_number":1678,"context_line":"    try:"},{"line_number":1679,"context_line":"        with session.begin():"},{"line_number":1680,"context_line":"            metadata \u003d values.get(\u0027metadata\u0027)"},{"line_number":1681,"context_line":"            if metadata is not None:"}],"source_content_type":"text/x-python","patch_set":2,"id":"bae84128_0732ea5e","line":1678,"updated":"2016-02-23 16:22:15.000000000","message":"Instead of adding a large try/except to each of these methods, this looks like something that could be cleanly encapsulated in a @handle_db_data_error decorator which we could just label each method with.\n\nThat would be much cleaner.","commit_id":"df61a7949d2b138a9a0ea740d02c569577e10177"},{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"da30a3a994de7859d0a401630e996b0c22cc069e","unresolved":false,"context_lines":[{"line_number":1696,"context_line":"            volume_ref \u003d _volume_get(context, volume_id, session\u003dsession)"},{"line_number":1697,"context_line":"            volume_ref.update(values)"},{"line_number":1698,"context_line":"    except db_exc.DBDataError:"},{"line_number":1699,"context_line":"        raise exception.Invalid()"},{"line_number":1700,"context_line":""},{"line_number":1701,"context_line":"    return volume_ref"},{"line_number":1702,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"bae84128_47b352e9","line":1699,"updated":"2016-02-23 16:22:15.000000000","message":"This should probably be exception.InvalidParameterValue() with a message passed in that gives a generic summary like \"data could not be written to database\".\n\n(I know I used exception.Invalid() in the other patch like this, but if we can propagate up better info, it would be much better.)","commit_id":"df61a7949d2b138a9a0ea740d02c569577e10177"}]}
