-
Notifications
You must be signed in to change notification settings - Fork 203
Open
Description
When we at our action do send_error { some => 'error' } the $response->content is serialized before before_serializer hook is called:
Line 199 in dc9df8b
| Dancer::Factory::Hook->execute_hooks('before_serializer', $response); |
sub serialize_response_if_needed {
my $response = Dancer::SharedData->response();
if (Dancer::App->current->setting('serializer') && $response->content()){
Dancer::Factory::Hook->execute_hooks('before_serializer', $response);
try {
Dancer::Serializer->process_response($response);
}
...this forehead serialization occurs here:
# Dancer/Error.pm _render_serialized
if (setting('show_errors')) {
Dancer::Response->new(
status => $self->code,
content => Dancer::Serializer->engine->serialize($message),
headers => ['Content-Type' => Dancer::Serializer->engine->content_type]
);
}which in turn called from here
# Dancer::Error->render
$response = $serializer ? $self->_render_serialized() : $self->_render_html();Metadata
Metadata
Assignees
Labels
No labels