RTC: Provide PROTOCOL_MISMATCH error handling#76991
Conversation
|
Size Change: +213 B (0%) Total Size: 7.97 MB 📦 View Changed
ℹ️ View Unchanged
|
|
Flaky tests detected in dd2c4e2. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/26107033750
|
|
Real-time collaboration will not ship in WordPress 7.0, so let's punt this to 7.1. |
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
…t isPolling) on protocol mismatch error + matching tests
…INITIAL_DISCONNECTED_DEBOUNCE_MS timeout
|
Merged trunk, added some recent room unregister improvements (5a8c2f8), and ensured we don't wait 20 seconds to show the dialog if it's a protocol mismatch and show it immediately (bb6bf1b). I tested this by adding this filter temporarily to add_filter(
'rest_pre_dispatch',
function ( $result, $server, $request ) {
if ( '/wp-sync/v1/updates' === $request->get_route() ) {
return new WP_Error(
'rest_sync_protocol_mismatch',
'Protocol mismatch (test)',
array( 'status' => 426 )
);
}
return $result;
},
10,
3
);Then, open a post and see the dialog: protocol-error-example.movAdditionally, here's what it looks like if a user receives protocol-error-ongoing.movNote that nothing actually fires these yet, they're just for future use when we do need a protocol change. |
What?
Provide error handling for future
PROTOCOL_MISMATCHerror.Why?
While this error currently does not exist, providing handling for it will allow it to be used during future upgrades.
IMPORTANT: This PR does not provide a way for users to save the post in progress. Either path (allowing save or not allowing save) potentially results in data loss.
How?
Add new error code and handling.