diff options
author | Daniel Friesel <derf@finalrewind.org> | 2015-09-20 20:21:59 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2015-09-20 20:21:59 +0200 |
commit | 6015b42bc44f3eec29b2e74acc1d3445dd241d48 (patch) | |
tree | d6e0c48b07e75e6db4c8bef1b376f51da679f1b9 /index.pl | |
parent | 0181fdcc3a02d1cba65dcff1369c82a003d8ad94 (diff) |
print error for unsupported backend, do not silently use ris
Diffstat (limited to 'index.pl')
-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; |