Report an unreachable headset as 502, not a server error

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
saphidandClaude Opus 5.5 committed 2026-09-26 07:40:48 +10:00
1 parent 60571dbfac
commit 71ea7df893
1 file changed
+4
+4
View File
@@ -819,6 +819,8 @@ class Handler(BaseHTTPRequestHandler):
self.send_json({"error": "not found"}, 404)
except Failure as e:
self.send_json({"error": str(e)}, e.status)
except frame_android.FrameError as e:
self.send_json({"error": str(e)}, 502)
except Exception as e:
self.send_json({"error": f"{type(e).__name__}: {e}"}, 500)
@@ -845,6 +847,8 @@ class Handler(BaseHTTPRequestHandler):
self.send_json({"error": str(e)}, e.status)
except (ValueError, TypeError) as e:
self.send_json({"error": f"bad request: {e}"}, 400)
except frame_android.FrameError as e:
self.send_json({"error": str(e)}, 502)
except Exception as e:
self.send_json({"error": f"{type(e).__name__}: {e}"}, 500)