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:
103 files changed
+426
-390
No files matched your search
@@ -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{
|
||||
|
||||
Reference in new issue
Block a user