From 4cf82ff8ca82727a2af605d7ff6e77355cd40806 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Wed, 10 May 2023 14:20:27 +0100 Subject: Don't log so much when the database is busy --- guix-build-coordinator/agent-messaging/http/server.scm | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'guix-build-coordinator/agent-messaging') diff --git a/guix-build-coordinator/agent-messaging/http/server.scm b/guix-build-coordinator/agent-messaging/http/server.scm index 389277f..8e27f53 100644 --- a/guix-build-coordinator/agent-messaging/http/server.scm +++ b/guix-build-coordinator/agent-messaging/http/server.scm @@ -892,6 +892,10 @@ port. Also, the port used can be changed by passing the --port option.\n" (render-json `((error . chunked-input-ended-prematurely)) #:code 400)) + ((worker-thread-timeout-error? exn) + (render-json + `((error . ,(simple-format #f "~A" exn))) + #:code 503)) (else (render-json `((error . ,(simple-format #f "~A" exn))) @@ -902,6 +906,7 @@ port. Also, the port used can be changed by passing the --port option.\n" (lambda (key . args) (unless (and (eq? '%exception key) (or (agent-error? (car args)) + (worker-thread-timeout-error? (car args)) (chunked-input-ended-prematurely-error? (car args)))) (match method-and-path-components ((method path-components ...) -- cgit v1.2.3