Skip to content

Commit

Permalink
fix msg
Browse files Browse the repository at this point in the history
  • Loading branch information
x-shadow-man committed Sep 8, 2021
2 parents bc251d9 + 22f194a commit e0f2871
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ public void invoke() {
if (exception instanceof RpcException) {
transportError(rpcExceptionCodeToGrpc(((RpcException) exception).getCode())
.withCause(exception), response.getObjectAttachments());
final GrpcStatus status = rpcExceptionCodeToGrpc(((RpcException) exception).getCode())
.withCause(exception);
transportError(status, response.getObjectAttachments());
} else {
transportError(GrpcStatus.fromCode(GrpcStatus.Code.UNKNOWN)
.withCause(exception), response.getObjectAttachments());
Expand Down Expand Up @@ -135,7 +138,9 @@ public void invoke() {
} catch (Throwable e) {
LOGGER.warn("Exception processing triple message", e);
if (e instanceof RpcException) {
transportError(rpcExceptionCodeToGrpc(((RpcException) e).getCode()), response.getObjectAttachments());
final GrpcStatus status = rpcExceptionCodeToGrpc(((RpcException) e).getCode())
.withCause(e);
transportError(status, response.getObjectAttachments());
} else {
transportError(GrpcStatus.fromCode(GrpcStatus.Code.UNKNOWN)
.withDescription("Exception occurred in provider's execution:" + e.getMessage())
Expand Down

0 comments on commit e0f2871

Please sign in to comment.