Package io.grpc.util

Class TransmitStatusRuntimeExceptionInterceptor

  • All Implemented Interfaces:
    ServerInterceptor

    @ExperimentalApi("https://github.com/grpc/grpc-java/issues/2189")
    public final class TransmitStatusRuntimeExceptionInterceptor
    extends Object
    implements ServerInterceptor
    A class that intercepts uncaught exceptions of type StatusRuntimeException and handles them by closing the ServerCall, and transmitting the exception's status and metadata to the client.

    Without this interceptor, gRPC will strip all details and close the ServerCall with a generic Status.UNKNOWN code.

    Security warning: the Status and Metadata may contain sensitive server-side state information, and generally should not be sent to clients. Only install this interceptor if all clients are trusted.