[hunchentoot-devel] Using json-rpc and Hunchentoot

Hans Hübner hans.huebner at gmail.com
Thu Apr 9 08:01:00 UTC 2009


On Thu, Apr 9, 2009 at 09:45, Leslie P. Polzer <sky at viridian-project.de> wrote:
> On Wed, Apr 08, 2009 at 05:16:47PM -0700, Brett van de Sande wrote:
>> However, the default Hunchentoot error messages have additional (important)
>> information, such as the actual lisp error message for a lisp error.
>> (This is given in the "content" argument of the function "start-output"
>> in headers.lisp.)  I need to be able to include this additional information
>> in my json-rpc formatted error messages.
>>
>> How would I do this?
>
> In Weblocks we have put a HANDLER-CASE around our request handler
> to catch internal errors outselves and then display the appropriate
> error message.

If you want to deliver a 500 HTTP status code, put 500 to the
HUNCHENTOOT:*APPROVED-RETURN-CODES* list in order to prevent
Hunchentoot's error handling mechanism intercept and mess with the
response.  Edi and I discussed that topic yesterday and we think that
there are some improvements to be made in how Hunchentoot handles
errors.  Expect changes in that area.

-Hans




More information about the Tbnl-devel mailing list