Skip to content

RTCError and RTCErrorEvent docs#44047

Open
hamishwillee wants to merge 1 commit into
mdn:mainfrom
hamishwillee:ff150_rtc_error_doc
Open

RTCError and RTCErrorEvent docs#44047
hamishwillee wants to merge 1 commit into
mdn:mainfrom
hamishwillee:ff150_rtc_error_doc

Conversation

@hamishwillee
Copy link
Copy Markdown
Collaborator

FF150 adds support for RTCErrorEvent and RTCError.

This updates the docs for those interfaces to match the current API templates, fixes weird layout, adds missing constructors.

This should all be at least as correct as it was before I started.

Related docs work can be tracked in #43970

@hamishwillee hamishwillee requested a review from a team as a code owner May 8, 2026 07:08
@hamishwillee hamishwillee requested review from chrisdavidmills and removed request for a team May 8, 2026 07:08
@github-actions github-actions Bot added Content:WebAPI Web API docs size/m [PR only] 51-500 LoC changed labels May 8, 2026
@hamishwillee hamishwillee mentioned this pull request May 8, 2026
8 tasks
## Instance properties

_In addition to the properties defined by the parent interface, {{domxref("DOMException")}}, `RTCError` includes the following properties:_
_Also inherits properties from its parent interface, {{DOMxRef("DOMException")}}_
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[markdownlint] reported by reviewdog 🐶
error MD036/no-emphasis-as-heading Emphasis used instead of a heading [Context: "Also inherits properties from ..."]

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chrisdavidmills I plan to ignore these reviewdoc notes.

## Instance properties

_In addition to the standard properties available on the {{domxref("Event")}} interface, `RTCErrorEvent` also includes the following:_
_Also inherits properties from its parent interface, {{domxref("Event")}}_
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[markdownlint] reported by reviewdog 🐶
error MD036/no-emphasis-as-heading Emphasis used instead of a heading [Context: "Also inherits properties from ..."]

## Instance methods

_No additional methods are provided beyond any found on the parent interface, {{domxref("Event")}}._
_Only inherits properties from its parent interface, {{domxref("Event")}}_
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[markdownlint] reported by reviewdog 🐶
error MD036/no-emphasis-as-heading Emphasis used instead of a heading [Context: "Only inherits properties from ..."]

Copy link
Copy Markdown
Contributor

@chrisdavidmills chrisdavidmills left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hamishwillee, more lovely comments for you. This is looking much better than it did before.


{{APIRef("WebRTC")}}

The **`RTCError()`** constructor creates and returns a new {{domxref("RTCError")}} object initialized with the different parameters and, optionally, a string to use as the value of the error's message property.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The **`RTCError()`** constructor creates and returns a new {{domxref("RTCError")}} object initialized with the different parameters and, optionally, a string to use as the value of the error's message property.
The **`RTCError()`** constructor creates and returns a new {{domxref("RTCError")}} object instance.

The rest of the description seemed a bit unnecessary.

### Parameters

- `options`
- : An object that can be provided to set the details of the specific error in an RTCErrorEvent.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- : An object that can be provided to set the details of the specific error in an RTCErrorEvent.
- : An object providing the details of the specific error in an `RTCErrorEvent`.

SCTP error cause codes 1-13 are defined in the SCTP specification: {{RFC(4960, "", "3.3.10")}}.
- `sdp-syntax-error`
- : The SDP syntax is invalid.
The line number within the SDP at which the error was detected should be set in [`sdpLineNumber`](#sdplinenumber).
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The line number within the SDP at which the error was detected should be set in [`sdpLineNumber`](#sdplinenumber).
The SDP message line number at which the error was detected should be set in [`sdpLineNumber`](#sdplinenumber).

This should only be set if `errorDetail` is `sctp-failure`.

- `sdpLineNumber` {{optional_inline}}
- : An integer identifying the line number of the {{Glossary("SDP")}} on which a syntax error occurred.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- : An integer identifying the line number of the {{Glossary("SDP")}} on which a syntax error occurred.
- : An integer identifying the {{Glossary("SDP")}} message line number at which a syntax error occurred.


### Return value

A newly-created {{domxref("RTCError")}} object.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
A newly-created {{domxref("RTCError")}} object.
A newly-created {{domxref("RTCError")}} object instance.

- : The negotiation of the {{Glossary("DTLS")}} connection failed, or the connection was terminated with a fatal error.
The error's {{domxref("DOMException.message", "message")}} contains details about the nature of the error.
If a fatal error is _received_, the error object's {{domxref("RTCError.receivedAlert", "receivedAlert")}} property is set to the value of the DTLSL alert received.
If, on the other hand, a fatal error was _sent_, the {{domxref("RTCError.sentAlert", "sentAlert")}} is set to the alert's value.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If, on the other hand, a fatal error was _sent_, the {{domxref("RTCError.sentAlert", "sentAlert")}} is set to the alert's value.
If, on the other hand, a fatal error was _sent_, the {{domxref("RTCError.sentAlert", "sentAlert")}} property is set to the alert's value.

alert's value.
- : The negotiation of the {{Glossary("DTLS")}} connection failed, or the connection was terminated with a fatal error.
The error's {{domxref("DOMException.message", "message")}} contains details about the nature of the error.
If a fatal error is _received_, the error object's {{domxref("RTCError.receivedAlert", "receivedAlert")}} property is set to the value of the DTLSL alert received.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is "DTLSL" supposed to be "DTLS"? I think there might have been another instance of this somewhere else.

the fingerprints listed in the SDP. If the remote peer can't match the local
certificate against the provided fingerprints, this error doesn't occur, though this
situation may result instead in a `dtls-failure` error.
- : The remote certificate for the {{domxref("RTCDtlsTransport")}} didn't match any of the fingerprints listed in the SDP.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Link "SDP" to glossary entry?

object's {{domxref("RTCError.sctpCauseCode", "sctpCauseCode")}}. SCTP error cause
codes 1-13 are defined in the SCTP specification: {{RFC(4960, "", "3.3.10")}}.
- : The {{Glossary("SCTP")}} negotiation has failed, or the connection has terminated with a fatal error.
The SCTP cause code can be found in the `RTCError` object's {{domxref("RTCError.sctpCauseCode", "sctpCauseCode")}}.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The SCTP cause code can be found in the `RTCError` object's {{domxref("RTCError.sctpCauseCode", "sctpCauseCode")}}.
The SCTP cause code can be found in the `RTCError` object's {{domxref("RTCError.sctpCauseCode", "sctpCauseCode")}} property.


tbd
- : The SDP syntax is invalid.
The error's {{domxref("RTCError.sdpLineNumber", "sdpLineNumber")}} property indicates the line number within the SDP at which the error was detected.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The error's {{domxref("RTCError.sdpLineNumber", "sdpLineNumber")}} property indicates the line number within the SDP at which the error was detected.
The error's {{domxref("RTCError.sdpLineNumber", "sdpLineNumber")}} property indicates the SDP message line number where the error was detected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:WebAPI Web API docs size/m [PR only] 51-500 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants