From 6e6a4edd274a7ee796e724b8d57f31069f2e6394 Mon Sep 17 00:00:00 2001 From: Richard Patel Date: Sun, 18 Nov 2018 14:25:06 +0100 Subject: [PATCH] Ignore all HTTP errors --- worker.go | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/worker.go b/worker.go index 9164178..a5c3a64 100644 --- a/worker.go +++ b/worker.go @@ -42,15 +42,11 @@ func (w WorkerContext) step(results chan<- File, job Job) { if httpErr, ok := err.(*HttpError); ok { switch httpErr.code { - case - fasthttp.StatusMovedPermanently, - fasthttp.StatusFound, - fasthttp.StatusUnauthorized, - fasthttp.StatusForbidden, - fasthttp.StatusNotFound: - return case fasthttp.StatusTooManyRequests: err = ErrRateLimit + default: + // Don't retry HTTP error codes + return } }