multi: fix fmt.Errorf error wrapping

Refactor fmt.Errorf usage to correctly wrap errors instead of using
non-wrapping format verbs.
This commit is contained in:
ffranr committed 2024-02-27 11:13:40 +00:00
1 parent 581c16d72f
commit cd566eb097
103 files changed
+426 -390

No files matched your search

+2 -2
View File
@@ -335,7 +335,7 @@ func (s *Server) UpdateNodeAnnouncement(_ context.Context,
if req.Color != "" {
color, err := lncfg.ParseHexColor(req.Color)
if err != nil {
return nil, fmt.Errorf("unable to parse color: %v", err)
return nil, fmt.Errorf("unable to parse color: %w", err)
}
if color != currentNodeAnn.RGBColor {
@@ -355,7 +355,7 @@ func (s *Server) UpdateNodeAnnouncement(_ context.Context,
if req.Alias != "" {
alias, err := lnwire.NewNodeAlias(req.Alias)
if err != nil {
return nil, fmt.Errorf("invalid alias value: %v", err)
return nil, fmt.Errorf("invalid alias value: %w", err)
}
if alias != currentNodeAnn.Alias {
resp.Ops = append(resp.Ops, &lnrpc.Op{