mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-13 14:40:21 -05:00
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
1 changed files with 2 additions and 1 deletions
|
@ -47,4 +47,5 @@ (define* (json-fetch url
|
||||||
(define (json-fetch-alist url)
|
(define (json-fetch-alist url)
|
||||||
"Return an alist representation of the JSON resource URL, or #f if URL
|
"Return an alist representation of the JSON resource URL, or #f if URL
|
||||||
returns 403 or 404."
|
returns 403 or 404."
|
||||||
(hash-table->alist (json-fetch url)))
|
(and=> (json-fetch url)
|
||||||
|
hash-table->alist))
|
||||||
|
|
Loading…
Reference in a new issue