fix(yjs): report why a handshake was refused and keep editing locally - #3270
Merged
Conversation
The Yjs server collapsed 401, 403 and 404 from the Graph permissions probe into one "access denied", and threw a plain Error. Refusals now carry a DeniedReason code (token-invalid, access-denied, malformed-document, server-error), mirrored as YjsDeniedReason in useYjsSession. Unexpected errors map to server-error instead of looking like a denial. A refused room no longer locks the editor read-only: it falls back to local mode, since AppWrapper derives read-only from the resource permissions and the WebDAV PUT is the real write gate.
JammingBen
force-pushed
the
fix/yjs-denied-reasons
branch
from
September 1, 2026 07:17
8cce39d to
ba4378e
Compare
kulmann
approved these changes
Sep 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Yjs server collapsed
401,403and404from the Graph permissions probe into one "access denied", and threw a plain Error.Refusals now carry a
DeniedReasoncode (token-invalid,access-denied,malformed-document,server-error), mirrored asYjsDeniedReasoninuseYjsSession. Unexpected errors map to server-error instead of looking like a denial.A refused room no longer locks the editor read-only: it falls back to local mode, since
AppWrapperderives read-only from the resource permissions and the WebDAV PUT is the real write gate.