work: Some HAFAS errors are not actionable and should not be logged as errors

This commit is contained in:
Birte Kristina Friesel 2024-01-11 18:37:12 +01:00
parent 2391980de5
commit a474981f6a
No known key found for this signature in database
GPG key ID: 19E6E524EBB177BA

View file

@ -83,8 +83,15 @@ sub run {
)->catch( )->catch(
sub { sub {
my ($err) = @_; my ($err) = @_;
if ( $err =~ m{svcResL\[0\][.]err is (?:FAIL|PARAMETER)$} )
{
# HAFAS do be weird. These are not actionable.
$self->app->log->debug("work($uid)/journey: $err");
}
else {
$self->app->log->error("work($uid)/journey: $err"); $self->app->log->error("work($uid)/journey: $err");
} }
}
)->wait; )->wait;
if ( $arr if ( $arr