aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Reports.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2016-12-01 18:23:54 +0000
committerMatthew Somerville <matthew-github@dracos.co.uk>2016-12-16 10:15:00 +0000
commit020769f403ef4cf1880bd061b6db6b4f4028d3e4 (patch)
tree6db18df5d7e3a4743c34802bd441946187d7e19c /perllib/FixMyStreet/App/Controller/Reports.pm
parentb8aa0d6da9009dc3182093165df9b1a4c6d7d164 (diff)
Return 400/500 for some client/server errors.
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Reports.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Reports.pm7
1 files changed, 3 insertions, 4 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Reports.pm b/perllib/FixMyStreet/App/Controller/Reports.pm
index 813c2052d..f2c43b5ee 100644
--- a/perllib/FixMyStreet/App/Controller/Reports.pm
+++ b/perllib/FixMyStreet/App/Controller/Reports.pm
@@ -76,13 +76,12 @@ sub index : Path : Args(0) {
$c->stash->{open} = $j->{open};
};
if ($@) {
- $c->stash->{message} = _("There was a problem showing the All Reports page. Please try again later.");
+ my $message = _("There was a problem showing the All Reports page. Please try again later.");
if ($c->config->{STAGING_SITE}) {
- $c->stash->{message} .= '</p><p>Perhaps the bin/update-all-reports script needs running. Use: bin/update-all-reports</p><p>'
+ $message .= '</p><p>Perhaps the bin/update-all-reports script needs running. Use: bin/update-all-reports</p><p>'
. sprintf(_('The error was: %s'), $@);
}
- $c->stash->{template} = 'errors/generic.html';
- return;
+ $c->detach('/page_error_500_internal_error', [ $message ]);
}
# Down here so that error pages aren't cached.