Skip to content

Commit

Permalink
fix::> Extrapolated new error meth
Browse files Browse the repository at this point in the history
Signed-off-by: Abhinav Prakash <[email protected]>
  • Loading branch information
PsychoPunkSage committed Feb 22, 2025
1 parent 127451d commit cdcfb61
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions gateway/backend_car.go
Original file line number Diff line number Diff line change
Expand Up @@ -1125,6 +1125,12 @@ func isRetryableError(err error) (bool, error) {
// blockstoreErrToGatewayErr translates underlying blockstore error into one that gateway code will return as HTTP 502 or 504
// it also makes sure Retry-After hint from remote blockstore will be passed to HTTP client, if present.
func blockstoreErrToGatewayErr(err error) error {
// Check for blocked content error first
var blocked *ErrorContentBlocked
if errors.As(err, &blocked) {
return err
}

if errors.Is(err, &ErrorStatusCode{}) ||
errors.Is(err, &ErrorRetryAfter{}) {
// already correct error
Expand Down

0 comments on commit cdcfb61

Please sign in to comment.