On 14-03-13 08:57 PM, Warren Young wrote:
Is there a way I can fix this without going back to manual JSON encoding?
My first thought is: do something with the 'before_serializer' hook.
hook 'before_serializer' => sub {
my $res = shift;
# set the answer to a glorious nothing if an exception is caught
$rest->content({}) if $res->content->{exception};
};
disclaimer: I didn't try it, so I might be wrong.
Joy,
`/anick
_______________________________________________
dancer-users mailing list
[email protected]
http://lists.preshweb.co.uk/mailman/listinfo/dancer-users