TUN-3107: UnregisterConnection shouldn't wrap nil error as RPC error
This commit is contained in:
parent
4d3ebaf984
commit
3886021ba5
|
@ -229,5 +229,8 @@ func (c TunnelServer_PogsClient) Unregister(ctx context.Context) error {
|
|||
return nil
|
||||
})
|
||||
_, err := promise.Struct()
|
||||
if err != nil {
|
||||
return wrapRPCError(err)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -37,10 +37,13 @@ func (re *RPCError) Error() string {
|
|||
}
|
||||
|
||||
func wrapRPCError(err error) *RPCError {
|
||||
if err != nil {
|
||||
return &RPCError{
|
||||
err: err,
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newRPCError(format string, args ...interface{}) *RPCError {
|
||||
return &RPCError{
|
||||
|
|
Loading…
Reference in New Issue