increased error reporting
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is failing Details

This commit is contained in:
Sarah Jamie Lewis 2021-09-10 10:18:54 -07:00
parent e2204a52dc
commit e967f151ee
1 changed files with 7 additions and 6 deletions

View File

@ -199,15 +199,16 @@ func (ta *TokenBoardClient) MakePayment() error {
conn.Close() conn.Close()
return nil return nil
} }
log.Errorf("invalid case of powapp. this should not happen")
return errors.New("invalid cast of powapp. this should never happen")
} }
} else { log.Debugf("could not connect to payment server %v..trying again")
log.Debugf("failed to make a connection. trying again...")
// it doesn't actually take that long to make a payment, so waiting a small amount of time should suffice
time.Sleep(time.Second)
return ta.MakePayment() return ta.MakePayment()
} }
log.Debugf("Error making payment: to %v %v", ta.tokenServiceOnion, err) log.Debugf("failed to make a connection. trying again...")
return err // it doesn't actually take that long to make a payment, so waiting a small amount of time should suffice
time.Sleep(time.Second)
return ta.MakePayment()
} }
// NextToken retrieves the next token // NextToken retrieves the next token