summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2022-08-01 20:03:34 +0200
committerDaniel Friesel <derf@finalrewind.org>2022-08-01 20:03:34 +0200
commitc348b2dff8d50c991c05599cdd678b5557716bba (patch)
tree57fae973bf95f7c39a205f4da222824c4018b874
parentd3c8daf84ca21c5b06db0f32caf00a66c42c470f (diff)
log requested station when throwing an ambiguous station name error
-rw-r--r--lib/Travelynx/Helper/IRIS.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Travelynx/Helper/IRIS.pm b/lib/Travelynx/Helper/IRIS.pm
index 0c6a611..ef179c8 100644
--- a/lib/Travelynx/Helper/IRIS.pm
+++ b/lib/Travelynx/Helper/IRIS.pm
@@ -64,7 +64,8 @@ sub get_departures {
elsif ( @station_matches > 1 ) {
return {
results => [],
- errstr => 'Mehrdeutiger Stationsname. Mögliche Eingaben: '
+ errstr =>
+ "Mehrdeutiger Stationsname: '$station'. Mögliche Eingaben: "
. join( q{, }, map { $_->[1] } @station_matches ),
};
}
@@ -150,7 +151,8 @@ sub get_departures_p {
return Mojo::Promise->reject(
{
results => [],
- errstr => 'Mehrdeutiger Stationsname. Mögliche Eingaben: '
+ errstr =>
+ "Mehrdeutiger Stationsname: '$station'. Mögliche Eingaben: "
. join( q{, }, map { $_->[1] } @station_matches ),
}
);