From b13972296f64499debf19c309d3144f406c397c3 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 5 Feb 2023 20:45:13 +0100 Subject: hafas: show errors rather than location selection --- lib/DBInfoscreen/Controller/Stationboard.pm | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/DBInfoscreen/Controller') diff --git a/lib/DBInfoscreen/Controller/Stationboard.pm b/lib/DBInfoscreen/Controller/Stationboard.pm index 5cb05c4..aa301fb 100644 --- a/lib/DBInfoscreen/Controller/Stationboard.pm +++ b/lib/DBInfoscreen/Controller/Stationboard.pm @@ -56,8 +56,13 @@ sub handle_no_results { $candidate->[0] =~ s{[&]#x0028;}{(}g; $candidate->[0] =~ s{[&]#x0029;}{)}g; } + my $err; + if ( not $errstr =~ m{LOCATION} ) { + $err = $errstr; + } $self->render( 'landingpage', + error => $err, stationlist => \@candidates, hide_opts => 0, status => 300, -- cgit v1.2.3