[webrtc-pc] Firing of RTCError events for SCTP appears to be at odds with test-cases in webrtc/RTCDataChannel-close.html (#3127)

docfaraday has just created a new issue for https://github.com/w3c/webrtc-pc:

== Firing of RTCError events for SCTP appears to be at odds with test-cases in webrtc/RTCDataChannel-close.html ==
On "sctp-failure", spec says:

> The SCTP negotiation has failed or the connection has been terminated with a fatal error. The [sctpCauseCode](https://w3c.github.io/webrtc-pc/#dom-rtcerror-sctpcausecode) attribute is set to the SCTP cause code

webrtc/RTCDataChannel-close.html expects RTCErrors with "sctp-failure" for graceful closure, and makes the sctpCauseCode optional:

```
    // Error should fire before close.
    assert_array_equals(events, ['error', 'close']);
    assert_true(error instanceof RTCError);
    assert_equals(error.name, 'OperationError');
    assert_equals(error.errorDetail, 'sctp-failure');
    // Expects the sctpErrorCode is either null or 12 (User-Initiated Abort) as it is
    // optional in the SCTP specification.
    assert_in_array(error.sctpCauseCode, [null, 12]);
```

An SCTP connection that is closed without a User-Initiated Abort is neither a case where "SCTP negotiation has failed", nor a case where the "connection has been terminated with a fatal error", so no error event is specified to be fired by current spec. Which is right?

Note that these questionable test-cases are part of Interop 2026.

Please view or discuss this issue at https://github.com/w3c/webrtc-pc/issues/3127 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Monday, 20 July 2026 22:18:53 UTC