From 9bf073c54f6a6dc70e01aa032fc53e2f06532275 Mon Sep 17 00:00:00 2001 From: colin Date: Sat, 17 Aug 2024 08:05:25 -0700 Subject: Add: general http error for use in user applications --- src/endpoint.lisp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/endpoint.lisp') diff --git a/src/endpoint.lisp b/src/endpoint.lisp index 52bce27..5c2a386 100644 --- a/src/endpoint.lisp +++ b/src/endpoint.lisp @@ -348,7 +348,12 @@ the ;." post-data :when= (http:raw-post-data :external-format :utf8 :want-stream (want-body-stream class)) - (funcall parser post-data))))) + (handler-case + (funcall parser post-data) + (error (e) + (protocol-error 'bad-body-error class + :wrapped e + :note "Error during the parsing of the body."))))))) (defun instantiate-endpoint (class args) -- cgit v1.2.3