Skip to content

helper: Fix error messages for wrapped gRPC errors

Our Errorf()-style error-wrapping functions know to propagate gRPC error codes from any wrapped status.Status error. While this in general works alright and does what it's intended to do, one thing that doesn't work is that the resulting error message contains a reference to the error code. This makes for hard-to-read error messages.

Fix this by wrapping all gRPC errors into a new error message wrapper. Instead of returning the string returned by status.Error(), which contains the reference to the error code, we only return the error message itself.

Merge request reports