Skip to content

Conversation

@takaokouji
Copy link

Summary

When a member attempts to join an expired Mesh V2 group, the connection now properly transitions to an error state instead of briefly showing success and then silently disconnecting.

Changes

  • Client-side Validation: Added a check in connect() to prevent joining groups that have already expired based on their expiresAt timestamp.
  • Disconnect Reasons: Updated MeshV2Service to pass error types (e.g., GroupNotFound, Unauthorized) as reasons to the disconnect callback.
  • Improved Error UI: The extension now sets its connection state to error when a group expires during operation or when a join attempt fails due to expiration.
  • Data Capture: Captured expiresAt from joinGroup response to prepare for future backend support.
  • Tests: Added a new unit test file test/unit/extension_mesh_v2_issue66.js covering these scenarios and updated existing tests to match the new API.

Fixes #66

- Add client-side validation for expired groups before joining
- Pass disconnect reason to disconnect callback
- Handle GroupNotFound and expired reasons by setting connection state to error
- Capture expiresAt from joinGroup result
- Add unit tests for expired group scenarios

Co-Authored-By: Gemini <noreply@google.com>
@takaokouji takaokouji merged commit b576ac1 into develop Dec 31, 2025
1 check passed
@takaokouji takaokouji deleted the fix/issue-66-expired-group-handling branch December 31, 2025 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve error handling when joining expired Mesh V2 groups

2 participants