Skip to content

Commit

Permalink
Merge pull request #186 from coinbase/patrick/silence-transient-errors
Browse files Browse the repository at this point in the history
[fetcher] Don't assert transient errors
  • Loading branch information
patrick-ogrady authored Oct 13, 2020
2 parents 0652de7 + c32e980 commit 0230083
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions fetcher/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,10 @@ func (f *Fetcher) RequestFailedError(
err error,
message string,
) *Error {
// Only check for error correctness if err is not context.Canceled.
if !errors.Is(err, context.Canceled) {
// Only check for error correctness if err is not context.Canceled
// and it is not transient (usually caused by the client failing
// the request).
if !errors.Is(err, context.Canceled) && !transientError(err) {
// If there is a *types.Error assertion error, we log it instead
// of exiting. Exiting abruptly here may cause unintended consequences.
if assertionErr := f.Asserter.Error(rosettaErr); assertionErr != nil {
Expand Down

0 comments on commit 0230083

Please sign in to comment.