From 36f3334cdd5d10b4f04caee47b8b116c24af92d7 Mon Sep 17 00:00:00 2001 From: Chris Schinnerl Date: Fri, 13 Oct 2023 16:16:55 +0200 Subject: [PATCH] autopilot: implement Error for refillError --- autopilot/accounts.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/autopilot/accounts.go b/autopilot/accounts.go index 2c52ff099..9e19d26ef 100644 --- a/autopilot/accounts.go +++ b/autopilot/accounts.go @@ -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 {