@@ -160,7 +160,7 @@ func (c *Conn) Notify(ctx context.Context, method string, params interface{}) er
160
160
c .Logger .Debug ("Notify" )
161
161
p , err := c .marshalInterface (params )
162
162
if err != nil {
163
- return Errorf (CodeParseError , "failed to marshaling notify parameters: %w " , err )
163
+ return Errorf (CodeParseError , "failed to marshaling notify parameters: %v " , err )
164
164
}
165
165
166
166
req := & NotificationMessage {
@@ -170,7 +170,7 @@ func (c *Conn) Notify(ctx context.Context, method string, params interface{}) er
170
170
}
171
171
data , err := json .Marshal (req ) // TODO(zchee): use gojay
172
172
if err != nil {
173
- return Errorf (CodeParseError , "failed to marshaling notify request: %w " , err )
173
+ return Errorf (CodeParseError , "failed to marshaling notify request: %v " , err )
174
174
}
175
175
176
176
c .Logger .Debug (Send ,
@@ -180,7 +180,7 @@ func (c *Conn) Notify(ctx context.Context, method string, params interface{}) er
180
180
181
181
err = c .stream .Write (ctx , data )
182
182
if err != nil {
183
- return Errorf (CodeInternalError , "failed to write notify request data to steam: %w " , err )
183
+ return Errorf (CodeInternalError , "failed to write notify request data to steam: %v " , err )
184
184
}
185
185
186
186
return nil
@@ -228,7 +228,7 @@ func (c *Conn) Call(ctx context.Context, method string, params, result interface
228
228
)
229
229
230
230
if err := c .stream .Write (ctx , data ); err != nil {
231
- return Errorf (CodeInternalError , "failed to write call request data to steam: %w " , err )
231
+ return Errorf (CodeInternalError , "failed to write call request data to steam: %v " , err )
232
232
}
233
233
234
234
// wait for the response
@@ -253,7 +253,7 @@ func (c *Conn) Call(ctx context.Context, method string, params, result interface
253
253
254
254
if err := json .Unmarshal (* resp .Result , result ); err != nil {
255
255
// if err := gojay.Unsafe.Unmarshal(*resp.Result, result); err != nil {
256
- return Errorf (CodeParseError , "failed to unmarshalling result: %w " , err )
256
+ return Errorf (CodeParseError , "failed to unmarshalling result: %v " , err )
257
257
}
258
258
259
259
return nil
@@ -280,7 +280,7 @@ func (c *Conn) Reply(ctx context.Context, req *Request, result interface{}, err
280
280
}
281
281
c .handlingMu .Unlock ()
282
282
if ! found {
283
- return Errorf (CodeInternalError , "not a call in progress: %w " , req .ID )
283
+ return Errorf (CodeInternalError , "not a call in progress: %v " , req .ID )
284
284
}
285
285
286
286
elapsed := time .Since (handling .start )
@@ -313,8 +313,7 @@ func (c *Conn) Reply(ctx context.Context, req *Request, result interface{}, err
313
313
zap .Any ("resp.Result" , resp .Result ),
314
314
zap .Error (err ),
315
315
)
316
- return Errorf (CodeParseError , "failed to marshaling reply response: %w" , err )
317
- // return err
316
+ return Errorf (CodeParseError , "failed to marshaling reply response: %v" , err )
318
317
}
319
318
320
319
c .Logger .Debug (Send ,
@@ -327,7 +326,7 @@ func (c *Conn) Reply(ctx context.Context, req *Request, result interface{}, err
327
326
if err := c .stream .Write (ctx , data ); err != nil {
328
327
// TODO(iancottrell): if a stream write fails, we really need to shut down
329
328
// the whole stream
330
- return Errorf (CodeInternalError , "failed to write response data to steam: %w " , err )
329
+ return Errorf (CodeInternalError , "failed to write response data to steam: %v " , err )
331
330
}
332
331
333
332
return nil
0 commit comments