@ -329,7 +329,7 @@ namespace Grpc.Core.Internal
protected override Exception GetRpcExceptionClientOnly ( )
protected override Exception GetRpcExceptionClientOnly ( )
{
{
return new RpcException ( finishedStatus . Value . Status ) ;
return new RpcException ( finishedStatus . Value . Status , finishedStatus . Value . Trailers ) ;
}
}
protected override Task CheckSendAllowedOrEarlyResult ( )
protected override Task CheckSendAllowedOrEarlyResult ( )
@ -348,7 +348,7 @@ namespace Grpc.Core.Internal
// Writing after the call has finished is not a programming error because server can close
// Writing after the call has finished is not a programming error because server can close
// the call anytime, so don't throw directly, but let the write task finish with an error.
// the call anytime, so don't throw directly, but let the write task finish with an error.
var tcs = new TaskCompletionSource < object > ( ) ;
var tcs = new TaskCompletionSource < object > ( ) ;
tcs . SetException ( new RpcException ( finishedStatus . Value . Status ) ) ;
tcs . SetException ( new RpcException ( finishedStatus . Value . Status , finishedStatus . Value . Trailers ) ) ;
return tcs . Task ;
return tcs . Task ;
}
}
@ -468,7 +468,7 @@ namespace Grpc.Core.Internal
var status = receivedStatus . Status ;
var status = receivedStatus . Status ;
if ( status . StatusCode ! = StatusCode . OK )
if ( status . StatusCode ! = StatusCode . OK )
{
{
unaryResponseTcs . SetException ( new RpcException ( status ) ) ;
unaryResponseTcs . SetException ( new RpcException ( status , receivedStatus . Trailers ) ) ;
return ;
return ;
}
}
@ -506,7 +506,7 @@ namespace Grpc.Core.Internal
var status = receivedStatus . Status ;
var status = receivedStatus . Status ;
if ( status . StatusCode ! = StatusCode . OK )
if ( status . StatusCode ! = StatusCode . OK )
{
{
streamingResponseCallFinishedTcs . SetException ( new RpcException ( status ) ) ;
streamingResponseCallFinishedTcs . SetException ( new RpcException ( status , receivedStatus . Trailers ) ) ;
return ;
return ;
}
}