1
0
Fork 0
mirror of https://github.com/NixOS/hydra.git synced 2024-10-18 17:02:28 -04:00

Set a 500 HTTP status on errors

This commit is contained in:
Eelco Dolstra 2013-02-22 14:27:38 +01:00
parent 961feedf4e
commit f2de374f28

View file

@ -191,6 +191,7 @@ sub end : ActionClass('RenderView') {
if (scalar @{$c->error}) { if (scalar @{$c->error}) {
$c->stash->{template} = 'error.tt'; $c->stash->{template} = 'error.tt';
$c->stash->{errors} = $c->error; $c->stash->{errors} = $c->error;
$c->response->status(500) if $c->response->status == 200;
if ($c->response->status >= 300) { if ($c->response->status >= 300) {
$c->stash->{httpStatus} = $c->stash->{httpStatus} =
$c->response->status . " " . HTTP::Status::status_message($c->response->status); $c->response->status . " " . HTTP::Status::status_message($c->response->status);