diff options
author | Christopher Baines <mail@cbaines.net> | 2020-05-08 11:14:15 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2020-05-08 11:14:15 +0100 |
commit | 2efa624b1fbe8f1dbadff23dfe1a9fa288f7a54c (patch) | |
tree | d85d6217c818706fa5f93d1979155093a8921cbb | |
parent | 753b30e7867237405f3bb20d43a50e1a9fdfd368 (diff) | |
download | build-coordinator-2efa624b1fbe8f1dbadff23dfe1a9fa288f7a54c.tar build-coordinator-2efa624b1fbe8f1dbadff23dfe1a9fa288f7a54c.tar.gz |
Make the access denied responses actual JSON objects
This is clearer.
-rw-r--r-- | guix-build-coordinator/agent-messaging/http.scm | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/guix-build-coordinator/agent-messaging/http.scm b/guix-build-coordinator/agent-messaging/http.scm index 2b67a59..1f1b5de 100644 --- a/guix-build-coordinator/agent-messaging/http.scm +++ b/guix-build-coordinator/agent-messaging/http.scm @@ -261,7 +261,7 @@ port. Also, the port used can be changed by passing the --port option.\n" (render-json (agent-details datastore uuid))) (render-json - "access denied" + '(("error" . "access denied")) #:code 403))) (('POST "agent" uuid "fetch-builds") (if (authenticated? uuid request) @@ -269,7 +269,7 @@ port. Also, the port used can be changed by passing the --port option.\n" (render-json `((builds . ,(list->vector builds))))) (render-json - "access denied" + '(("error" . "access denied")) #:code 403))) (('PUT "build" uuid) (let ((agent-id-for-build @@ -299,7 +299,7 @@ port. Also, the port used can be changed by passing the --port option.\n" "message received")))) #:unwind? #t) (render-json - "access denied" + '(("error" . "access denied")) #:code 403)))) (('POST "build" uuid "report-setup-failure") (let ((agent-id-for-build @@ -316,7 +316,7 @@ port. Also, the port used can be changed by passing the --port option.\n" (render-json "message received")) (render-json - "access denied" + '(("error" . "access denied")) #:code 403)))) (('PUT "build" uuid "log" format) (let ((agent-id-for-build @@ -341,7 +341,7 @@ port. Also, the port used can be changed by passing the --port option.\n" "error" #:code 500))) (render-json - "access denied" + '(("error" . "access denied")) #:code 403)))) (('PUT "build" uuid "output" output-name) (let ((agent-id-for-build @@ -367,7 +367,7 @@ port. Also, the port used can be changed by passing the --port option.\n" "error" #:code 500))) (render-json - "access denied" + '(("error" . "access denied")) #:code 403)))) (('GET "metrics") (update-base-datastore-metrics!) |