Skip to content

478 role action false success#506

Merged
thehabes merged 6 commits intomainfrom
478-role-action-false-success
Mar 16, 2026
Merged

478 role action false success#506
thehabes merged 6 commits intomainfrom
478-role-action-false-success

Conversation

@cubap
Copy link
Copy Markdown
Member

@cubap cubap commented Mar 10, 2026

  • collaborator mutation methods now validate semantic failure payloads even on HTTP 200
  • local collaborator state only mutates after validated success
  • errors are re-thrown so UI paths can show failure instead of false success

added a test as well.

cubap added 2 commits March 10, 2026 13:03
Add a private #validateResponse method to parse JSON/text responses, extract meaningful error messages, and detect semantic failures even when HTTP status is 200. Replace ad-hoc response.ok checks across member/role API calls (removeMember, promoteUser, removeLeaderRole, revokeWriteAccess, setUserRoles, updateRoles) to use #validateResponse, return the parsed payload when available, surface user-friendly messages via userMessage/alerts, and rethrow errors so callers can handle them. This change prevents silent success on semantically failed responses and centralizes response validation/decoding.
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 10, 2026

@thehabes thehabes self-requested a review March 16, 2026 16:57
Copy link
Copy Markdown
Member

@thehabes thehabes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am having all kind of UX issues with this interface, both upstream and in here. I think this PR can go through, but we need to do usability testing on this interface and have another pass at it.

@thehabes thehabes merged commit 52670e7 into main Mar 16, 2026
3 checks passed
@thehabes thehabes deleted the 478-role-action-false-success branch March 16, 2026 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants