mirror of
https://github.com/cloudflare/cloudflared.git
synced 2025-07-27 07:20:19 +00:00
TUN-3107: UnregisterConnection shouldn't wrap nil error as RPC error
This commit is contained in:
@@ -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{
|
||||
|
Reference in New Issue
Block a user