forked from line/armeria
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Provide a way to send error details with
ArmeriaStatusException
(li…
…ne#4341) Motivation: When a user implements a gRPC service using `AbstractUnaryGrpcService`, they can throw an `ArmeriaStatusException` to send an error response. However, the user can't send the error details as defined in [status.proto](https://github.com/googleapis/googleapis/blob/3474dc892349674efda09d74b3a574765d996188/google/rpc/status.proto#L46) because `ArmeriaStatusException` doesn't have a details field. Modifications: - Add `byte[] details` to `ArmeriaStatusException` so that a user can add the serialized `details` field; - Update `AbstractUnsafeUnaryGrpcService` so it sends the `details` in an error response; - Update `UnaryGrpcClient` so it reads the details into `ArmeriaStatusException`. Result: - Closes line#4306 . - Users can add custom `details` when throwing an `ArmeriaStatusException`. --------- Co-authored-by: jrhee17 <[email protected]> Co-authored-by: minux <[email protected]> Co-authored-by: Ikhun Um <[email protected]>
- Loading branch information
1 parent
25dbf13
commit 900002d
Showing
10 changed files
with
100 additions
and
14 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
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
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
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