You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a user implements a gRPC service using AbstractUnaryGrpcService, he or she can throw an ArmeriaStatusException to send an error response. However, the user can't send the error details as defined in status.proto because ArmeriaStatusException doesn't have a details field.
We could:
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; and
Update UnaryGrpcClient so it reads the details into ArmeriaStatusException.
The text was updated successfully, but these errors were encountered:
)
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#4306 .
- Users can add custom `details` when throwing an
`ArmeriaStatusException`.
---------
Co-authored-by: jrhee17 <guins_j@guins.org>
Co-authored-by: minux <songmw725@gmail.com>
Co-authored-by: Ikhun Um <ikhun.um@linecorp.com>
When a user implements a gRPC service using
AbstractUnaryGrpcService
, he or she can throw anArmeriaStatusException
to send an error response. However, the user can't send the error details as defined instatus.proto
becauseArmeriaStatusException
doesn't have adetails
field.We could:
byte[] details()
toArmeriaStatusException
so that a user can add the serializeddetails
field;AbstractUnsafeUnaryGrpcService
so it sends thedetails
in an error response; andUnaryGrpcClient
so it reads thedetails
intoArmeriaStatusException
.The text was updated successfully, but these errors were encountered: