GrpcStatusException
Available in a dev version: 0․11․0-grpc-186
How to configure
Exception used for propagating gRPC status information in non-OK results.
This is the primary mechanism for reporting and handling errors in gRPC calls. When a server encounters an error, it typically throws a GrpcStatusException with an appropriate GrpcStatusCode to signal the failure to the client. Clients receive this exception when remote calls fail with a non-OK status.
The easiest way to construct a GrpcStatusException is to use the GrpcStatusCode.asException extension function:
throw GrpcStatusCode.UNAUTHORIZED.asException("Authentication failed")See also
Exception used for propagating gRPC status information in non-OK results.
This is the primary mechanism for reporting and handling errors in gRPC calls. When a server encounters an error, it typically throws a GrpcStatusException with an appropriate GrpcStatusCode to signal the failure to the client. Clients receive this exception when remote calls fail with a non-OK status.
The easiest way to construct a GrpcStatusException is to use the GrpcStatusCode.asException extension function:
throw GrpcStatusCode.UNAUTHORIZED.asException("Authentication failed")See also
Exception used for propagating gRPC status information in non-OK results.
This is the primary mechanism for reporting and handling errors in gRPC calls. When a server encounters an error, it typically throws a GrpcStatusException with an appropriate GrpcStatusCode to signal the failure to the client. Clients receive this exception when remote calls fail with a non-OK status.
The easiest way to construct a GrpcStatusException is to use the GrpcStatusCode.asException extension function:
throw GrpcStatusCode.UNAUTHORIZED.asException("Authentication failed")