In Issue #12826 Mehrdad Afshari said the following which is identical to my situation:
There was at least one case where the user wants to return a result from an interceptor, not the handler, and there was no generic way to figure out what the type of the correct type to return from the handler was in the interceptor to construct an empty object out of. That is the prime motivator for moving this forward.
throw new RpcException(new Status(StatusCode.Aborted, "Interceptor aborted"));
public override Task<TResponse> UnaryServerHandler<TRequest, TResponse>(TRequest request, ServerCallContext context, UnaryServerMethod<TRequest, TResponse> continuation)
{
context.Status = new Status(StatusCode.Aborted, "Interceptor aborted
");
return Task.FromResult(Activator.CreateInstance<TResponse>());
}