When I have network problems sometimes I get a backtrace like this:
substitute: 1727: 3 [%start-stack load-stack #<procedure a97d60 at ice-9/boot-9.scm:4047:10 ()>]
substitute: 1732: 2 [#<procedure a99b70 ()>]
substitute: In unknown file:
substitute: ?: 1 [primitive-load "/gnu/store/175nlv448nk5kagwwl3zyy2w4726qfz6-guix-0.12.0-4.d9da/bin/.guix-real"]
substitute: In guix/ui.scm:
substitute: 1228: 0 [run-guix-command substitute "--query"]
substitute: guix/ui.scm:1228:8: In procedure run-guix-command:
substitute: guix/ui.scm:1228:8: Throw to key `bad-response' with args `("Bad Response-Line: ~s" (""))'.
(a) convert that into a normal runtime error message and
(b) Fallback to substituteless building (maybe only for this thing).