From eec9ebe3add5e107729e5000591844a0e1ee9aa2 Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Sat, 11 Jan 2025 08:46:32 +0100 Subject: Add backend selection link to Bad Gateway / Gateway Timeout error messages --- lib/Travelynx/Controller/Traveling.pm | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'lib/Travelynx/Controller/Traveling.pm') diff --git a/lib/Travelynx/Controller/Traveling.pm b/lib/Travelynx/Controller/Traveling.pm index 54eb12b..a0ae43b 100755 --- a/lib/Travelynx/Controller/Traveling.pm +++ b/lib/Travelynx/Controller/Traveling.pm @@ -1131,18 +1131,22 @@ sub station { } )->wait; } - elsif ( $err =~ m{svcRes|connection close|Service Temporarily Unavailable} ) { + elsif ( $err + =~ m{svcRes|connection close|Service Temporarily Unavailable} ) + { $self->render( 'bad_gateway', - message => $err, - status => 502 + message => $err, + status => 502, + select_new_backend => 1, ); } elsif ( $err =~ m{timeout}i ) { $self->render( 'gateway_timeout', - message => $err, - status => 504 + message => $err, + status => 504, + select_new_backend => 1, ); } else { -- cgit v1.2.3