Unverified Commit c348b2df authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

log requested station when throwing an ambiguous station name error

parent d3c8daf8
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -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 ),
			}
		);