← Back to release summary

WebTransportError API alignment and serialization

Category
Network / Connectivity
Type
Chromium catches up
Status
Proposed (Chrome Proposed)
Intent stage
None

WPT details: https://wpt.fyi/results/webtransport/idlharness.https.sub.any.html?label=experimental&label=master&aligned

Summary

Updates Chromium WebTransportError to match the current WebTransport specification. Adds the standard (message, options) constructor while preserving the shipped dictionary constructor for compatibility; carries the full unsigned-long stream error code end to end; and makes WebTransportError structured-clonable while preserving its message, source, and nullable error code. Serialization is enabled by default behind a writer-side runtime kill switch, while decoding remains permanently enabled for persisted values.

Motivation

Chromium's shipped WebTransportError implementation predates the current WebTransport specification. It accepts a legacy dictionary-only constructor, narrows outgoing application stream error codes to 8 bits despite the API exposing an unsigned long, and does not support the structured serialization required by the specification. The change aligns Chromium with the standardized API and improves WebTransport interoperability. The legacy constructor remains available so existing Chromium applications continue to work.

Standards & signals

Ecosystem

Docs: https://developer.mozilla.org/en-US/docs/Web/API/WebTransportError https://developer.chrome.com/docs/capabilities/web-apis/webtransport

Samples: https://developer.mozilla.org/en-US/docs/Web/API/WebTransportError

Explainers: https://github.com/w3c/webtransport/blob/main/explainer.md

View on chromestatus.com