Subject: | Errors are returned in body instead of $c->log->error. |
Normally don't want to expose errors like this.
And when serializing a response then this should be a 500, not a client error.
sub serialize_bad_request {
my ( $self, $c, $content_type, $error ) = @_;
$c->res->content_type('text/plain');
$c->res->status(400);
$c->res->body(
"Content-Type " . $content_type . " had a problem with your request.\r\n***ERROR***\r\n$error" );
return undef;
}