Subject: Re: bug#63646: [PATCH] substitute: If a server's nar URL is 404, try the next one(s).

From: Ludovic Courtès <[email-masked]>
Date: Mon, 22 May 2023 17:45:27 +0200

Ludovic Courtès <[email-masked]> skribis:

> +  (define (try-fetch choices)
> +    (match choices
> +      (((uri compression file-size) rest ...)
> +       (guard (c ((and (pair? rest) (network-error? c))
> +                  (warning (G_ "download from '~a' failed, trying next URL~%")
> +                           (uri->string uri))

I realized we can change ‘network-error?’ to ‘http-get-error?’ above.
Otherwise, we could find ourselves trying several nar URLs on the same
server when the error is ETIMEDOUT or ECONNREFUSED, which would be a
waste of time.

Ludo’.