Skip to content

Commit

Permalink
fix report rpc error
Browse files Browse the repository at this point in the history
  • Loading branch information
henrod committed Feb 21, 2019
1 parent 252ecec commit 4681d95
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cluster/grpc_rpc_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,12 @@ func (gs *GRPCClient) Call(ctx context.Context, rpcType protos.RPCType, route *r
if res.Error.Code == "" {
res.Error.Code = pitErrors.ErrUnknownCode
}
e := &pitErrors.Error{
err = &pitErrors.Error{
Code: res.Error.Code,
Message: res.Error.Msg,
Metadata: res.Error.Metadata,
}
return nil, e
return nil, err
}
return res, nil

Expand Down
4 changes: 2 additions & 2 deletions cluster/nats_rpc_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,12 +190,12 @@ func (ns *NatsRPCClient) Call(
if res.Error.Code == "" {
res.Error.Code = errors.ErrUnknownCode
}
e := &errors.Error{
err = &errors.Error{
Code: res.Error.Code,
Message: res.Error.Msg,
Metadata: res.Error.Metadata,
}
return nil, e
return nil, err
}
return res, nil
}
Expand Down

0 comments on commit 4681d95

Please sign in to comment.