multi: wrap all errors

This commit is contained in:
Oliver Gugger
2024-03-07 13:19:28 +01:00
committed by Andras Banki-Horvath
parent 9a28a4c105
commit 648fb22f63
60 changed files with 138 additions and 133 deletions

View File

@ -1919,7 +1919,7 @@ func newPsbtAssembler(req *lnrpc.OpenChannelRequest, normalizedMinConfs int32,
bytes.NewReader(psbtShim.BasePsbt), false,
)
if err != nil {
return nil, fmt.Errorf("error parsing base PSBT: %v",
return nil, fmt.Errorf("error parsing base PSBT: %w",
err)
}
}
@ -2144,7 +2144,7 @@ func (r *rpcServer) parseOpenChannelReq(in *lnrpc.OpenChannelRequest,
in.CloseAddress, r.cfg.ActiveNetParams.Params,
)
if err != nil {
return nil, fmt.Errorf("error parsing upfront shutdown: %v",
return nil, fmt.Errorf("error parsing upfront shutdown: %w",
err)
}
@ -6513,7 +6513,7 @@ func (r *rpcServer) StopDaemon(_ context.Context,
// otherwise some funds wouldn't be picked up.
isRecoveryMode, progress, err := r.server.cc.Wallet.GetRecoveryInfo()
if err != nil {
return nil, fmt.Errorf("unable to get wallet recovery info: %v",
return nil, fmt.Errorf("unable to get wallet recovery info: %w",
err)
}
if isRecoveryMode && progress < 1 {
@ -7211,7 +7211,7 @@ func (r *rpcServer) ForwardingHistory(ctx context.Context,
}
timeSlice, err := r.server.miscDB.ForwardingLog().Query(eventQuery)
if err != nil {
return nil, fmt.Errorf("unable to query forwarding log: %v",
return nil, fmt.Errorf("unable to query forwarding log: %w",
err)
}
@ -8013,7 +8013,7 @@ func (r *rpcServer) FundingStateStep(ctx context.Context,
false,
)
if err != nil {
return nil, fmt.Errorf("error parsing psbt: %v",
return nil, fmt.Errorf("error parsing psbt: %w",
err)
}