diff options
author | Christopher Baines <mail@cbaines.net> | 2020-05-09 08:47:57 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2020-05-09 08:47:57 +0100 |
commit | 1ad69ee934611bc7935a9c48dd144e44285b9e19 (patch) | |
tree | 00dbec355431eb9e52aa76d0d3360f52053a6423 | |
parent | 4074fe0ef0dda57ef20da73cb6b8880ee8bf7d13 (diff) | |
download | build-coordinator-1ad69ee934611bc7935a9c48dd144e44285b9e19.tar build-coordinator-1ad69ee934611bc7935a9c48dd144e44285b9e19.tar.gz |
Remove custom error handling for build results
Just use the standard error handling in the controller.
-rw-r--r-- | guix-build-coordinator/agent-messaging/http.scm | 32 |
1 files changed, 9 insertions, 23 deletions
diff --git a/guix-build-coordinator/agent-messaging/http.scm b/guix-build-coordinator/agent-messaging/http.scm index 676651c..b60065f 100644 --- a/guix-build-coordinator/agent-messaging/http.scm +++ b/guix-build-coordinator/agent-messaging/http.scm @@ -279,29 +279,15 @@ port. Also, the port used can be changed by passing the --port option.\n" (let ((agent-id-for-build (datastore-agent-for-build datastore uuid))) (if (authenticated? agent-id-for-build request) - (with-exception-handler - (lambda (exn) - (simple-format (current-error-port) - "exception: ~A\n" - exn) - (render-json - `((error . ,(exception-message exn))) - #:code 500)) ; TODO better code - (lambda () - (with-exception-handler - (lambda (exn) - (backtrace) - (raise-exception exn)) - (lambda () - (handle-build-result build-coordinator - agent-id-for-build uuid - (json-string->scm (utf8->string body))) - ;; Trigger build allocation, as the result of this build - ;; could change the allocation - (trigger-build-allocation) - (render-json - "message received")))) - #:unwind? #t) + (begin + (handle-build-result build-coordinator + agent-id-for-build uuid + (json-string->scm (utf8->string body))) + ;; Trigger build allocation, as the result of this build + ;; could change the allocation + (trigger-build-allocation) + (render-json + "message received")) (render-json '(("error" . "access denied")) #:code 403)))) |