Package net.devh.boot.grpc.server.error
Interface GrpcExceptionResponseHandler
- All Known Implementing Classes:
GrpcAdviceExceptionHandler
public interface GrpcExceptionResponseHandler
An exception handler for errors in the grpc call execution (For both the grpc method implementations and the
StreamObservers used to process incoming messages and sending outgoing errors).
Implementations must:
- Call
ServerCall.close(Status, Metadata)before returning - Not throw (any thrown errors must be caught)
- Not keep a reference to the call instance after the call
-
Method Summary
Modifier and TypeMethodDescriptionvoidhandleError(ServerCall<?, ?> serverCall, Throwable error) Handles an exception by closing the call with an appropriateStatus.
-
Method Details
-
handleError
Handles an exception by closing the call with an appropriateStatus.- Parameters:
serverCall- The server call used to send the response status.error- The error to handle.
-