aboutsummaryrefslogtreecommitdiff
path: root/guix-build-coordinator/agent-messaging
diff options
context:
space:
mode:
Diffstat (limited to 'guix-build-coordinator/agent-messaging')
-rw-r--r--guix-build-coordinator/agent-messaging/http/server.scm21
1 files changed, 7 insertions, 14 deletions
diff --git a/guix-build-coordinator/agent-messaging/http/server.scm b/guix-build-coordinator/agent-messaging/http/server.scm
index aaa88cb..e2e752c 100644
--- a/guix-build-coordinator/agent-messaging/http/server.scm
+++ b/guix-build-coordinator/agent-messaging/http/server.scm
@@ -160,7 +160,12 @@ INTERVAL (a time-duration object), otherwise does nothing and returns #f."
(length (all-threads)))
(call-with-delay-logging port-metrics-updater))
- (call-with-error-handling
+ (with-exception-handler
+ (lambda (exn)
+ (simple-format
+ (current-error-port)
+ "exception when starting: ~A\n" exn)
+ (primitive-exit 1))
(lambda ()
(run-server/patched
(lambda (request body)
@@ -182,19 +187,7 @@ INTERVAL (a time-duration object), otherwise does nothing and returns #f."
update-managed-metrics!)))
#:host host
#:port port))
- #:on-error 'backtrace
- #:post-error (lambda (key . args)
- (when (eq? key 'system-error)
- (match args
- (("bind" "~A" ("Address already in use") _)
- (simple-format
- (current-error-port)
- "\n
-error: guix-build-coordinator could not start, as it could not bind to port ~A
-
-Check if it's already running, or whether another process is using that
-port. Also, the port used can be changed by passing the --port option.\n"
- port)))))))
+ #:unwind? #t))
(define* (render-json json #:key (extra-headers '())
(code 200))