public async Task <bool> MoveNext(CancellationToken cancellationToken) { try { return(await _wrappedReader.MoveNext(cancellationToken)); } catch (RpcException ex) { if (RpcExceptionBuilder.Build(ex, out var rpcException)) { throw rpcException; } throw; } }
private static async Task <TResponse> Handle <TResponse>(AsyncUnaryCall <TResponse> call) { try { await call.ResponseHeadersAsync; return(await call.ResponseAsync); } catch (RpcException ex) { if (RpcExceptionBuilder.Build(ex, out var rpcException)) { throw rpcException; } throw; } }