From c32e9805b22f7f28cc00a4a61a9831ae017a15f7 Mon Sep 17 00:00:00 2001 From: Patrick O'Grady Date: Tue, 13 Oct 2020 15:36:43 -0700 Subject: [PATCH] Don't assert transient errors --- fetcher/errors.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fetcher/errors.go b/fetcher/errors.go index 164d831b..8d852118 100644 --- a/fetcher/errors.go +++ b/fetcher/errors.go @@ -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 {