[dancer-users] Patch to fix exception serialization under JSON/XML (https://github.com/PerlDancer/Dancer/issues/877)
rik at rikbrown.co.uk
Mon Dec 24 22:05:31 GMT 2012
I just raised this bug, and made a patch for it. Details are at https://github.com/PerlDancer/Dancer/issues/877 - but in short, Dancer::Error passes the Dancer::Exception::* object through to the serializer, which then explodes because (certainly for JSON/XML) it is not configured to support serialising objects (and probably shouldn't be!).
The patch removes sending this exception through. In the case of JSON/XML, this never worked, but for non-object exceptions (i.e. die "some string"), it changes the response from having identical 'error' and 'exception' keys to having only an 'error' key.
I'd appreciate any feedback on the (2 line!) patch - this is my first time contributing to Dancer so I may not be following procedure properly :-).
Cheers - and have a great Christmas everyone!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the dancer-users