mirror of
https://github.com/smittix/intercept.git
synced 2026-07-16 21:38:11 -07:00
fix(meshcore): surface backend error messages and extend polling window
- Store last status message on MeshcoreClient so error details survive beyond the SSE event (which isn't active during connecting state) - Status endpoint now returns message field so the frontend can show the real reason (e.g. 'Connection failed after retries: ...') - Extend JS polling from 30s to 90s to outlast the backend's 65s retry sequence (5+15+45s delays) before declaring timeout Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+5
-1
@@ -48,7 +48,11 @@ def status():
|
||||
}
|
||||
)
|
||||
c = _client()
|
||||
return jsonify({"available": True, "state": c.get_state().value})
|
||||
state, message = c.get_state()
|
||||
payload = {"available": True, "state": state.value}
|
||||
if message:
|
||||
payload["message"] = message
|
||||
return jsonify(payload)
|
||||
|
||||
|
||||
@meshcore_bp.route("/connect", methods=["POST"])
|
||||
|
||||
Reference in New Issue
Block a user