diff options
Diffstat (limited to 'lib')
-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 { |