Use the default knots web server exception handler

This commit is contained in:
Christopher Baines 2025-02-03 12:18:54 +01:00
parent 49f9aa4822
commit f9e6daad99

View file

@ -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))