summaryrefslogtreecommitdiff
path: root/lib/Travelynx
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2024-11-23 10:04:48 +0100
committerBirte Kristina Friesel <derf@finalrewind.org>2024-11-23 10:04:48 +0100
commitd0c0c2bc7c17f0df5f359f49f1dafa61e095fc47 (patch)
treeb76cbfdf517048a85a7001be7d64db6f58334fce /lib/Travelynx
parent509c2377614c3d7fca5f407b247b85d804c39aaa (diff)
departures: distinguish between backend errors (502) and internal errors (500)2.9.1
Closes #179
Diffstat (limited to 'lib/Travelynx')
-rwxr-xr-xlib/Travelynx/Controller/Traveling.pm9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/Travelynx/Controller/Traveling.pm b/lib/Travelynx/Controller/Traveling.pm
index bbd85b6..0a94a1e 100755
--- a/lib/Travelynx/Controller/Traveling.pm
+++ b/lib/Travelynx/Controller/Traveling.pm
@@ -1129,11 +1129,18 @@ sub station {
}
)->wait;
}
+ elsif ( $err =~ m{svcRes} ) {
+ $self->render(
+ 'bad_gateway',
+ message => $err,
+ status => 502
+ );
+ }
else {
$self->render(
'exception',
exception => $err,
- status => 502
+ status => 500
);
}
}