-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for encoding error structure for grpc errors
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 in that 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 to wrap multiple errors and the implementation isn't dependent on the contents. Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
- Loading branch information
1 parent
acf19c1
commit a5367c8
Showing
3 changed files
with
225 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters