protected Status resolveStatus(final Object mappedReturnType) {
        if (mappedReturnType instanceof Status) {
            return (Status) mappedReturnType;
        } else if (mappedReturnType instanceof Throwable) {
            return Status.fromThrowable((Throwable) mappedReturnType);
        }
        throw new IllegalStateException(String.format(
                "Error for mapped return type [%s] inside @GrpcAdvice, it has to be of type: "
                        + "[Status, StatusException, StatusRuntimeException, Throwable] ",
                mappedReturnType));
    }
Creates a new {@link GrpcAdvice} powered {@link GrpcExceptionHandler}.

@param grpcExceptionHandlerMethodResolver The method resolver to use.
grpc-server-spring-boot-starter/src/main/java/net/devh/boot/grpc/server/advice/GrpcAdviceExceptionHandler.java