@@ -60,7 +60,7 @@ func (e *ErrClient) Error() string {
6060}
6161
6262// Unwrap unwraps the actual error
63- func (e * ErrClient ) Unwrap (err error ) error {
63+ func (e * ErrClient ) Unwrap () error {
6464 return e .err
6565}
6666
@@ -149,7 +149,7 @@ func httpClient(ctx context.Context, addr string, namespace string, outs []inter
149149
150150 hreq , err := http .NewRequest ("POST" , addr , bytes .NewReader (b ))
151151 if err != nil {
152- return clientResponse {}, err
152+ return clientResponse {}, & RPCConnectionError { err }
153153 }
154154
155155 hreq .Header = requestHeader .Clone ()
@@ -162,7 +162,7 @@ func httpClient(ctx context.Context, addr string, namespace string, outs []inter
162162
163163 httpResp , err := _defaultHTTPClient .Do (hreq )
164164 if err != nil {
165- return clientResponse {}, err
165+ return clientResponse {}, & RPCConnectionError { err }
166166 }
167167 defer httpResp .Body .Close ()
168168
@@ -192,7 +192,7 @@ func websocketClient(ctx context.Context, addr string, namespace string, outs []
192192 connFactory := func () (* websocket.Conn , error ) {
193193 conn , _ , err := websocket .DefaultDialer .Dial (addr , requestHeader )
194194 if err != nil {
195- return nil , xerrors .Errorf ("cannot dial address %s for %w" , addr , err )
195+ return nil , & RPCConnectionError { xerrors .Errorf ("cannot dial address %s for %w" , addr , err )}
196196 }
197197 return conn , nil
198198 }
0 commit comments