Add support for encoding error structure for grpc errors #15
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds support for encoding the error structure for grpc errors. It
does this by using the details to encode any wrapped errors.
Each error is composed of a
Status
protobuf. The message included inthat status is the default error message if no additional details are
provided. The first detail is an encoding of the error if one was given.
If there was no encoding possible or it wasn't possible to deserialize
it, a generic error is created with the original message.
Any additional details are any wrapped errors. Each wrapped error is a
Status
that follows the same encoding scheme. This allows an error towrap multiple errors and the implementation isn't dependent on the
contents.