Traewelling: more consistent error messages

This commit is contained in:
Daniel Friesel 2022-02-17 21:40:47 +01:00
parent 6d3a0f8649
commit 582bfbe661
No known key found for this signature in database
GPG key ID: 100D5BFB5166E005
3 changed files with 9 additions and 10 deletions

View file

@ -2241,7 +2241,7 @@ sub startup {
$self->traewelling->log( $self->traewelling->log(
uid => $uid, uid => $uid,
message => message =>
"Fehler bei $traewelling->{line} nach $traewelling->{arr_name}: $dep->{errstr}", "Konnte $traewelling->{line} nach $traewelling->{arr_name} nicht übernehmen: $dep->{errstr}",
status_id => $traewelling->{status_id}, status_id => $traewelling->{status_id},
is_error => 1, is_error => 1,
); );
@ -2322,7 +2322,7 @@ sub startup {
$self->traewelling->log( $self->traewelling->log(
uid => $uid, uid => $uid,
message => message =>
"Fehler bei $traewelling->{line} nach $traewelling->{arr_name}: $err", "Konnte $traewelling->{line} nach $traewelling->{arr_name} nicht übernehmen: $err",
status_id => $traewelling->{status_id}, status_id => $traewelling->{status_id},
is_error => 1 is_error => 1
); );
@ -2333,7 +2333,7 @@ sub startup {
$self->traewelling->log( $self->traewelling->log(
uid => $uid, uid => $uid,
message => message =>
"$traewelling->{line} nach $traewelling->{arr_name} nicht gefunden", "Konnte $traewelling->{line} nach $traewelling->{arr_name} nicht übernehmen: Zug nicht gefunden",
status_id => $traewelling->{status_id}, status_id => $traewelling->{status_id},
is_error => 1 is_error => 1
); );

View file

@ -257,7 +257,7 @@ sub run {
$self->app->traewelling->log( $self->app->traewelling->log(
uid => $candidate->{uid}, uid => $candidate->{uid},
message => message =>
"Fehler bei $candidate->{train_type} $candidate->{train_no}: Keine trip_id vorhanden", "Konnte $candidate->{train_type} $candidate->{train_no} nicht übertragen: Keine trip_id vorhanden",
is_error => 1 is_error => 1
); );
next; next;
@ -294,8 +294,7 @@ sub run {
my ($err) = @_; my ($err) = @_;
$self->app->traewelling->log( $self->app->traewelling->log(
uid => $account_data->{user_id}, uid => $account_data->{user_id},
message => message => "Fehler bei der Status-Abfrage: $err",
"Fehler bei der Status-Abfrage von Träwelling: $err",
is_error => 1 is_error => 1
); );
$self->app->log->debug("Error $err"); $self->app->log->debug("Error $err");

View file

@ -362,7 +362,7 @@ sub checkin {
$self->{model}->log( $self->{model}->log(
uid => $opt{uid}, uid => $opt{uid},
message => message =>
"Checkin-Fehler bei $opt{train_type} $opt{train_no}: $err_msg", "Konnte $opt{train_type} $opt{train_no} nicht übertragen: $err_msg",
is_error => 1 is_error => 1
); );
return; return;
@ -392,7 +392,7 @@ sub checkin {
$self->{model}->log( $self->{model}->log(
uid => $opt{uid}, uid => $opt{uid},
message => message =>
"Checkin-Fehler bei $opt{train_type} $opt{train_no}: $err", "Konnte $opt{train_type} $opt{train_no} nicht übertragen: $err",
is_error => 1 is_error => 1
); );
} }