From 158ccca896754ce1dbb7885aba3212a852a7bed9 Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Wed, 4 Dec 2024 17:43:47 +0100 Subject: Add a separate error message for gateway timeouts --- lib/Travelynx/Controller/Traveling.pm | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/Travelynx/Controller/Traveling.pm') diff --git a/lib/Travelynx/Controller/Traveling.pm b/lib/Travelynx/Controller/Traveling.pm index 0a94a1e..101ae11 100755 --- a/lib/Travelynx/Controller/Traveling.pm +++ b/lib/Travelynx/Controller/Traveling.pm @@ -1136,6 +1136,13 @@ sub station { status => 502 ); } + elsif ( $err =~ m{timeout}i ) { + $self->render( + 'gateway_timeout', + message => $err, + status => 504 + ); + } else { $self->render( 'exception', -- cgit v1.2.3