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:
James Smith
2026-05-13 20:59:33 +01:00
parent 152fd4753d
commit cfa5333845
3 changed files with 12 additions and 5 deletions
+5 -1
View File
@@ -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"])