From a474981f6a7cb3b67d84ed337ecf2521cd9ef000 Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Thu, 11 Jan 2024 18:37:12 +0100 Subject: [PATCH] work: Some HAFAS errors are not actionable and should not be logged as errors --- lib/Travelynx/Command/work.pm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/Travelynx/Command/work.pm b/lib/Travelynx/Command/work.pm index a02618b..10b1b69 100644 --- a/lib/Travelynx/Command/work.pm +++ b/lib/Travelynx/Command/work.pm @@ -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;