docs(realtime): document DataChannels reliability and ordering#32028
Open
harshith-cloudflare wants to merge 1 commit into
Open
Conversation
- Add ordered, maxRetransmits, and maxPacketLifeTime to OpenAPI DataChannelObject - Document reliability on both local (publisher) and remote (subscriber) channels - Note that createDataChannel() must mirror the same options for negotiated channels
Contributor
Review
Fix in your agentFix the following review findings in PR #32028 (https://github.com/cloudflare/cloudflare-docs/pull/32028).
Before making changes, review each finding and present a brief summary table:
- For each finding, state whether you agree, disagree, or need clarification
- If you disagree (e.g. the fix requires disproportionate effort for minimal benefit,
or the finding is factually incorrect), explain why
- If you need clarification before deciding, ask those questions
- Then share your plan for which issues to tackle and in what order
After triaging, fix all legitimate findings. For any you decide to skip,
post a comment on this PR with the finding ID and your reasoning.
---
## Code Review
### Warnings (1)
#### CR-b02196318aa6 · Missing HTTP response validation
- **File:** `src/content/docs/realtime/sfu/datachannels.mdx` line 132
- **Issue:** The new subscriber example awaits `fetch(...).then((r) => r.json())` (lines 116-132) without checking `r.ok`, so a 4xx/5xx error response is still parsed as JSON (or throws a `SyntaxError` for a non-JSON error body). The following `resp.dataChannels[0].id` (lines 135-136) then dereferences an undefined value, producing a confusing runtime error for users who copy the snippet.
- **Fix:** Add an `if (!r.ok)` check before `r.json()` and surface the API error, or guard `resp.dataChannels[0]` before indexing into the response.
---
## Style Guide Review
### Suggestions (1)
#### SG-0fcd5178820a · Use <TypeScriptExample> for TypeScript code blocks
- **File:** `src/content/docs/realtime/sfu/datachannels.mdx` line 77
- **Issue:** Line adds a raw ```ts fenced block in a docs MDX file
- **Fix:** Use the <TypeScriptExample> component instead; it auto-generates a JS tab
Code ReviewThis code review is in beta and may not always be helpful — use your judgment. Warnings (1)
ConventionsNo convention issues found. Style Guide ReviewSuggestions (1)
CommandsOnly codeowners can run commands. Post a comment with the command to trigger it.
|
Contributor
|
should this have an actual changelog? https://developers.cloudflare.com/changelog/ |
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.
Summary
This PR is to document the datachannels reliability and ordering settings.
Documentation checklist