summaryrefslogtreecommitdiff
path: root/lib/Travelynx
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2024-06-10 21:51:56 +0200
committerBirte Kristina Friesel <derf@finalrewind.org>2024-06-10 21:51:56 +0200
commitc290077471357069c206c24de6c14606587c7f96 (patch)
treed64d5cdba6ff276e180cfaef53504bcaaa26c757 /lib/Travelynx
parentc969019bb3fa79a54d51ffdd9c285cb6d45c2d09 (diff)
add journey: return HTTP 400 on input error
Diffstat (limited to 'lib/Travelynx')
-rwxr-xr-xlib/Travelynx/Controller/Traveling.pm3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Travelynx/Controller/Traveling.pm b/lib/Travelynx/Controller/Traveling.pm
index 89385e1..fa618cb 100755
--- a/lib/Travelynx/Controller/Traveling.pm
+++ b/lib/Travelynx/Controller/Traveling.pm
@@ -2112,6 +2112,7 @@ sub add_journey_form {
$self->render(
'add_journey',
with_autocomplete => 1,
+ status => 400,
error =>
'Zug muss als „Typ Nummer“ oder „Typ Linie Nummer“ eingegeben werden.'
);
@@ -2126,6 +2127,7 @@ sub add_journey_form {
$self->render(
'add_journey',
with_autocomplete => 1,
+ status => 400,
error => "${key}: Ungültiges Datums-/Zeitformat"
);
return;
@@ -2167,6 +2169,7 @@ sub add_journey_form {
$self->render(
'add_journey',
with_autocomplete => 1,
+ status => 400,
error => $error,
);
}