-
Patrick Steinhardt authored
Gitaly has started to return detailed errors in the context of UserMergeBranch, which was the first proof of concept to see whether this new model makes sense for error handling. With the introduction of structured error handling we also had to convert Rails to handle these new types of errors, which led to the introduction of the new helper function `#decode_detailed_error`. This function both is responsible for decoding the error, and translating it into Rails-specific errors. While it makes sense to have it decode errors, the concrete translation into Rails-specific errors is something that is specific for every RPC: UserMergeBranch can return one set of error details, while other RPCs may return a different set of error details. Mixing this all into a single function that is supposed to be shared between RPCs thus does not make much sense. Refactor the code to move the RPC-specific error translation into the RPC's own error handling. This prepares for the introduction of error detail handling in UserSquash.
d85e262e