Skip to content

Commit

Permalink
autopilot: implement Error for refillError
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisSchinnerl committed Oct 13, 2023
1 parent 8df905c commit 36f3334
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions autopilot/accounts.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,13 @@ func (err *refillError) Is(target error) bool {
return errors.Is(err.err, target)
}

func (err *refillError) Error() string {
if err.err == nil {
return ""
}
return err.err.Error()
}

func refillWorkerAccount(ctx context.Context, a AccountStore, am alerts.Alerter, w Worker, workerID string, contract api.ContractMetadata) (accountID rhpv3.Account, refilled bool, rerr *refillError) {
wrapErr := func(err error, keysAndValues ...interface{}) *refillError {
if err == nil {
Expand Down

0 comments on commit 36f3334

Please sign in to comment.