Skip to content
Snippets Groups Projects
Commit 9d07df09 authored by ale's avatar ale
Browse files

Retry requests on transport-level errors

parent de767cce
No related branches found
No related tags found
No related merge requests found
......@@ -132,7 +132,9 @@ func (h *warcSaveHandler) Handle(p crawl.Publisher, u string, tag, depth int, re
// output) and replace it with a buffer.
data, derr := ioutil.ReadAll(resp.Body)
if derr != nil {
return derr
// Errors at this stage are usually transport-level errors,
// and as such, retriable.
return crawl.ErrRetryRequest
}
resp.Body = ioutil.NopCloser(bytes.NewReader(data))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment