Subject: Re: [bug#70494] [PATCH 18/23] guix: http-client: Add network-error?.

From: Ludovic Courtès <[email-masked]>
Date: Thu, 16 May 2024 18:23:22 +0200

Christopher Baines <[email-masked]> skribis:

> Plus remove http-get-error? from network-error? as a http-get-error? doesn't
> indicate a network error.
>
> * guix/scripts/substitute.scm (system-error?, network-error?): Move from here.
> (process-substitution/fallback, process-substitution): Use http-get-error?
> with network-error?.
> * guix/http-client.scm: To here, and also don't use http-get-error?.
>
> Change-Id: I61ee9e5fbf90ebb76a34aa8b9ec8f5d74f8a3c54

LGTM, but...

> -              (guard (c ((network-error? c)
> +              (guard (c ((or (http-get-error? c)
> +                             (network-error? c))
>                           (when (http-get-error? c)
>                             (warning (G_ "download from '~a' failed: ~a, ~s~%")
>                                      (uri->string (http-get-error-uri c))
> @@ -663,7 +644,8 @@ (define* (process-substitution store-item destination
>    (let ((expected-hash
>           actual-hash
>           (guard
> -             (c ((network-error? c)
> +             (c ((or (http-get-error? c)
> +                     (network-error? c))

These two hunks should probably go to a different commit, because
they’re really fixing a bug.

(The commit log subject line doesn’t need the “guix:” prefix.)