diff options
-rw-r--r-- | index.pl | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -69,7 +69,7 @@ sub get_results_for { }; $cache->freeze( $cache_str, $data ); } - else { + elsif ( $backend eq 'ris' ) { my $status = Travel::Status::DE::HAFAS->new( station => $station, excluded_mots => [qw[bus ferry ondemand tram u]], @@ -81,6 +81,12 @@ sub get_results_for { }; $cache->freeze( $cache_str, $data ); } + else { + $data = { + results => [], + errstr => "Backend '$backend' not supported", + }; + } } return $data; |