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,7 +83,14 @@ sub run {
)->catch(
sub {
my ($err) = @_;
$self->app->log->error("work($uid)/journey: $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");
}
}
)->wait;