log error when trip_id is missing
This commit is contained in:
parent
64c9b5b160
commit
8d53f7f5c8
2 changed files with 7 additions and 2 deletions
|
@ -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 )
|
||||
|
|
Loading…
Reference in a new issue