import: json: Handle the error case.
* guix/import/json.scm (json-fetch-alist): Handle the error case.
This commit is contained in:
parent
02d5ed4a27
commit
ad0082afe0
|
@ -47,4 +47,5 @@ the query."
|
|||
(define (json-fetch-alist url)
|
||||
"Return an alist representation of the JSON resource URL, or #f if URL
|
||||
returns 403 or 404."
|
||||
(hash-table->alist (json-fetch url)))
|
||||
(and=> (json-fetch url)
|
||||
hash-table->alist))
|
||||
|
|
Loading…
Reference in New Issue