-
-
Notifications
You must be signed in to change notification settings - Fork 608
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow BoulderErrors to be interpreted as grpc.Statuses (#6654)
Add the GRPCStatus method to our BoulderError type, so that the gRPC server code can automatically set an appropriate Status on all gRPC responses, based on the kind of error that we return. We still serialize the whole BoulderError type and details into the response metadata, so that it can be rehydrated on the client side, but this allows the gRPC-native Status to be something other than Unknown. As part of this change, have our custom error serialization code stop manually setting the gRPC status code to codes.Unknown. This change allows the default gRPC prometheus metrics to more accurately report the kinds of errors our gRPC requests experience, and may allow us to more elegantly transition to using grpc.Status errors in other places where they're relevant and useful.
- Loading branch information
1 parent
851136d
commit 58f1c55
Showing
3 changed files
with
64 additions
and
15 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