diff options
author | Birte Kristina Friesel <derf@finalrewind.org> | 2025-01-11 08:46:32 +0100 |
---|---|---|
committer | Birte Kristina Friesel <derf@finalrewind.org> | 2025-01-11 08:46:32 +0100 |
commit | eec9ebe3add5e107729e5000591844a0e1ee9aa2 (patch) | |
tree | f32a3fd369fc7335d0484bcf59e7c6e1d136f356 /lib/Travelynx | |
parent | be77455f8a824e41796fbd9eaf4a32f090d7d35b (diff) |
Add backend selection link to Bad Gateway / Gateway Timeout error messages
Diffstat (limited to 'lib/Travelynx')
-rwxr-xr-x | lib/Travelynx/Controller/Traveling.pm | 14 |
1 files changed, 9 insertions, 5 deletions
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 { |