station board: fix HTTP status and IRIS error handling
This commit is contained in:
parent
2123a67ba0
commit
5b88a4bb3d
1 changed files with 9 additions and 4 deletions
|
@ -935,17 +935,22 @@ sub station {
|
|||
}
|
||||
)->catch(
|
||||
sub {
|
||||
my ($err) = @_;
|
||||
if ( ref($err) eq 'HASH' ) {
|
||||
my ( $err, $status ) = @_;
|
||||
if ($status) {
|
||||
$self->render(
|
||||
'landingpage',
|
||||
with_autocomplete => 1,
|
||||
with_geolocation => 1,
|
||||
error => $err->{errstr},
|
||||
error => $status->{errstr},
|
||||
status => 400,
|
||||
);
|
||||
}
|
||||
else {
|
||||
$self->render( 'exception', exception => $err );
|
||||
$self->render(
|
||||
'exception',
|
||||
exception => $err,
|
||||
status => 500
|
||||
);
|
||||
}
|
||||
}
|
||||
)->wait;
|
||||
|
|
Loading…
Reference in a new issue