Ignore all HTTP errors

This commit is contained in:
Richard Patel
2018-11-18 14:25:06 +01:00
parent a71157b4d8
commit 6e6a4edd27

View File

@@ -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
}
}