From a083884d256e42404c4a5538de8e0b502b907e1c Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Fri, 24 Oct 2025 21:04:18 +0200 Subject: Traveling: document why we're returning HTTP 200 on error --- lib/Travelynx/Controller/Traveling.pm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'lib/Travelynx/Controller/Traveling.pm') diff --git a/lib/Travelynx/Controller/Traveling.pm b/lib/Travelynx/Controller/Traveling.pm index 197d0aa..4e4a4ef 100755 --- a/lib/Travelynx/Controller/Traveling.pm +++ b/lib/Travelynx/Controller/Traveling.pm @@ -630,7 +630,10 @@ sub geolocation { error => $err, }, - #status => 502, + # The frontend JavaScript does not have an XHR error handler yet + # (and if it did, I do not know whether it would have access to our JSON body). + # So, for now, we do the bad thing™ and return HTTP 200 even though the request to the backend was not successful. + # status => 502, ); } )->wait; @@ -676,7 +679,8 @@ sub geolocation { error => $err, }, - #status => 502 + # See above + # status => 502 ); } )->wait; @@ -729,6 +733,7 @@ sub geolocation { error => $err, }, + # See above #status => 502 ); } @@ -780,6 +785,7 @@ sub geolocation { error => $err, }, + # See above #status => 502 ); } -- cgit v1.2.3