summaryrefslogtreecommitdiff
path: root/lib/Travelynx/Helper/IRIS.pm
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2023-07-09 17:41:47 +0200
committerBirte Kristina Friesel <derf@finalrewind.org>2023-07-09 17:41:51 +0200
commit2123a67ba0e1b03e1c286bd2d39e6771cc9f145b (patch)
tree49d60dc0e2b7aefe0bd4db32d8ec4d19afe8ee9c /lib/Travelynx/Helper/IRIS.pm
parent1074f248cc415a397f16d0328a8f45fa6a867513 (diff)
IRIS->get_departures_p: return string in first rejection argument
This is consistent with other promises within travelynx
Diffstat (limited to 'lib/Travelynx/Helper/IRIS.pm')
-rw-r--r--lib/Travelynx/Helper/IRIS.pm3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Travelynx/Helper/IRIS.pm b/lib/Travelynx/Helper/IRIS.pm
index 456ef07..4c286cb 100644
--- a/lib/Travelynx/Helper/IRIS.pm
+++ b/lib/Travelynx/Helper/IRIS.pm
@@ -138,6 +138,7 @@ sub get_departures_p {
sub {
my ($err) = @_;
$promise->reject(
+ $err,
{
results => [],
errstr => "Error in promise: $err",
@@ -150,6 +151,7 @@ sub get_departures_p {
}
elsif ( @station_matches > 1 ) {
return Mojo::Promise->reject(
+ 'ambiguous station name',
{
results => [],
errstr =>
@@ -160,6 +162,7 @@ sub get_departures_p {
}
else {
return Mojo::Promise->reject(
+ 'unknown station',
{
results => [],
errstr => 'Unbekannte Station',