Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.

Commit

Permalink
fix: handle both 404 and 502 from L1s
Browse files Browse the repository at this point in the history
  • Loading branch information
lidel committed Feb 24, 2023
1 parent c794451 commit a1f20de
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,8 @@ func (p *pool) doFetch(ctx context.Context, from string, c cid.Cid, attempt int)
return nil, fmt.Errorf("http error from strn: %d, err=%w", resp.StatusCode, ErrSaturnTimeout)
}

if resp.StatusCode == http.StatusNotFound {
// This should only be 502, but L1s were not translating 404 from Lassie, so we have to support both for now.
if resp.StatusCode == http.StatusNotFound || resp.StatusCode == http.StatusBadGateway {

This comment has been minimized.

Copy link
@lidel

lidel Feb 24, 2023

Author Contributor

opinion

This comment has been minimized.

Copy link
@willscott

willscott Feb 24, 2023

Contributor

this should be fixed now, right?

return nil, fmt.Errorf("http error from strn: %d, err=%w", resp.StatusCode, ErrContentProviderNotFound)
}

Expand Down

0 comments on commit a1f20de

Please sign in to comment.