Skip to content
Snippets Groups Projects
Commit 8d53f7f5 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

log error when trip_id is missing

parent 64c9b5b1
No related branches found
No related tags found
No related merge requests found
......@@ -265,8 +265,12 @@ sub run {
my $trip_id = $candidate->{journey_data}{trip_id};
if ( not $trip_id ) {
$self->app->log->debug("... trip_id is missing");
# TODO log traewelling error
$self->app->traewelling->log(
uid => $candidate->{uid},
message =>
"Fehler bei $opt{train_type} $opt{train_no}: Keine trip_id vorhanden",
is_error => 1
);
return;
}
if ( $candidate->{data}{latest_push_ts}
......
......@@ -285,6 +285,7 @@ sub checkin {
$opt{dep_eva}
);
# Work around https://github.com/Traewelling/traewelling/issues/72
$self->{user_agent}->request_timeout(20)
->get_p(
"https://traewelling.de/api/v0/trains/trip?$trip_req" => $header )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment