From 7dcbfcbbdb7ea9630bceeea9ed221a7464b525f8 Mon Sep 17 00:00:00 2001 From: Anna Shaleva Date: Mon, 6 Jun 2022 12:58:15 +0300 Subject: [PATCH] rpc: improve WS connection closure error a bit Ref. https://github.com/nspcc-dev/neofs-node/pull/1480#issuecomment-1147256917. --- pkg/rpc/client/wsclient.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/rpc/client/wsclient.go b/pkg/rpc/client/wsclient.go index 95fd7f256..6898a1055 100644 --- a/pkg/rpc/client/wsclient.go +++ b/pkg/rpc/client/wsclient.go @@ -257,7 +257,7 @@ writeloop: break writeloop } if err := c.ws.WriteJSON(req); err != nil { - connCloseErr = fmt.Errorf("failed to write JSON request: %w", err) + connCloseErr = fmt.Errorf("failed to write JSON request (%s / %d): %w", req.Method, len(req.RawParams), err) break writeloop } case <-pingTicker.C: