From f9e6daad99b697d31a9cbccacf8ca590e1e9e99f Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Mon, 3 Feb 2025 12:18:54 +0100 Subject: Use the default knots web server exception handler --- guix-data-service/web/server.scm | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/guix-data-service/web/server.scm b/guix-data-service/web/server.scm index 20b34cb..d6bd970 100644 --- a/guix-data-service/web/server.scm +++ b/guix-data-service/web/server.scm @@ -262,16 +262,12 @@ port. Also, the port used can be changed by passing the --port option.\n" pool stats))))) + ;; Use the error output from the default exception handler + (default-exception-handler exn request) + (let ((path-components mime-types (request->path-components-and-mime-type request))) - (simple-format - (current-error-port) - "error: when processing: ~A /~A\n ~A\n" - (request-method request) - (string-join path-components "/") - exn) - (case (most-appropriate-mime-type mime-types '(text/html application/json)) -- cgit v1.2.3