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

Traewelling checkin: Handle invalid / revoked bearer tokens

parent 562dd7cc
No related branches found
No related tags found
No related merge requests found
......@@ -323,6 +323,19 @@ sub checkin {
);
return;
}
# Work around https://github.com/Traewelling/traewelling/issues/128
if ( $tx->res->code == 302 ) {
my $err_msg = "Der Login-Token wurde nicht akzeptiert";
$self->{log}->debug("... error: $err_msg");
$self->{model}->log(
uid => $opt{uid},
message =>
"Fehler bei $opt{train_type} $opt{train_no}: $err_msg",
is_error => 1
);
return;
}
$self->{log}->debug( "... success! " . $tx->res->body );
# As of 2020-10-04, traewelling.de checkins do not yet return
......
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