---
title: "RTCError | JavaScript maps SDK"
description: "Documentation for MapTiler SDK"
---

> For AI agents: a documentation index is available at [/llms.txt](https://docs.maptiler.com/llms.txt). Markdown versions of all pages are available by appending .md to any URL.

# Interface RTCError

The **`RTCError`** interface describes an error which has occurred while handling WebRTC operations. It's based upon the standard DOMException interface that describes general DOM errors.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCError)

interface RTCError {  
    [ABORT\_ERR](#abort_err): 20;  
    [cause](#cause)?: unknown;  
    [code](#code): number;  
    [DATA\_CLONE\_ERR](#data_clone_err): 25;  
    [DOMSTRING\_SIZE\_ERR](#domstring_size_err): 2;  
    [errorDetail](#errordetail): [RTCErrorDetailType](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.RTCErrorDetailType/);  
    [HIERARCHY\_REQUEST\_ERR](#hierarchy_request_err): 3;  
    [INDEX\_SIZE\_ERR](#index_size_err): 1;  
    [INUSE\_ATTRIBUTE\_ERR](#inuse_attribute_err): 10;  
    [INVALID\_ACCESS\_ERR](#invalid_access_err): 15;  
    [INVALID\_CHARACTER\_ERR](#invalid_character_err): 5;  
    [INVALID\_MODIFICATION\_ERR](#invalid_modification_err): 13;  
    [INVALID\_NODE\_TYPE\_ERR](#invalid_node_type_err): 24;  
    [INVALID\_STATE\_ERR](#invalid_state_err): 11;  
    [message](#message): string;  
    [name](#name): string;  
    [NAMESPACE\_ERR](#namespace_err): 14;  
    [NETWORK\_ERR](#network_err): 19;  
    [NO\_DATA\_ALLOWED\_ERR](#no_data_allowed_err): 6;  
    [NO\_MODIFICATION\_ALLOWED\_ERR](#no_modification_allowed_err): 7;  
    [NOT\_FOUND\_ERR](#not_found_err): 8;  
    [NOT\_SUPPORTED\_ERR](#not_supported_err): 9;  
    [QUOTA\_EXCEEDED\_ERR](#quota_exceeded_err): 22;  
    [receivedAlert](#receivedalert): number | null;  
    [sctpCauseCode](#sctpcausecode): number | null;  
    [sdpLineNumber](#sdplinenumber): number | null;  
    [SECURITY\_ERR](#security_err): 18;  
    [sentAlert](#sentalert): number | null;  
    [stack](#stack)?: string;  
    [SYNTAX\_ERR](#syntax_err): 12;  
    [TIMEOUT\_ERR](#timeout_err): 23;  
    [TYPE\_MISMATCH\_ERR](#type_mismatch_err): 17;  
    [URL\_MISMATCH\_ERR](#url_mismatch_err): 21;  
    [VALIDATION\_ERR](#validation_err): 16;  
    [WRONG\_DOCUMENT\_ERR](#wrong_document_err): 4;  
}

#### Hierarchy

-   DOMException
    -   RTCError

##### Index

### Properties[](#properties)

[ABORT\_ERR](#abort_err) [cause?](#cause) [code](#code) [DATA\_CLONE\_ERR](#data_clone_err) [DOMSTRING\_SIZE\_ERR](#domstring_size_err) [errorDetail](#errordetail) [HIERARCHY\_REQUEST\_ERR](#hierarchy_request_err) [INDEX\_SIZE\_ERR](#index_size_err) [INUSE\_ATTRIBUTE\_ERR](#inuse_attribute_err) [INVALID\_ACCESS\_ERR](#invalid_access_err) [INVALID\_CHARACTER\_ERR](#invalid_character_err) [INVALID\_MODIFICATION\_ERR](#invalid_modification_err) [INVALID\_NODE\_TYPE\_ERR](#invalid_node_type_err) [INVALID\_STATE\_ERR](#invalid_state_err) [message](#message) [name](#name) [NAMESPACE\_ERR](#namespace_err) [NETWORK\_ERR](#network_err) [NO\_DATA\_ALLOWED\_ERR](#no_data_allowed_err) [NO\_MODIFICATION\_ALLOWED\_ERR](#no_modification_allowed_err) [NOT\_FOUND\_ERR](#not_found_err) [NOT\_SUPPORTED\_ERR](#not_supported_err) [QUOTA\_EXCEEDED\_ERR](#quota_exceeded_err) [receivedAlert](#receivedalert) [sctpCauseCode](#sctpcausecode) [sdpLineNumber](#sdplinenumber) [SECURITY\_ERR](#security_err) [sentAlert](#sentalert) [stack?](#stack) [SYNTAX\_ERR](#syntax_err) [TIMEOUT\_ERR](#timeout_err) [TYPE\_MISMATCH\_ERR](#type_mismatch_err) [URL\_MISMATCH\_ERR](#url_mismatch_err) [VALIDATION\_ERR](#validation_err) [WRONG\_DOCUMENT\_ERR](#wrong_document_err)

## Properties[](#properties-1)

### `Readonly`ABORT\_ERR[](#abort_err)

ABORT\_ERR: 20

Inherited from DOMException.ABORT\_ERR

### `Optional`cause[](#cause)

cause?: unknown

Inherited from DOMException.cause

### `Readonly`code[](#code)

code: number

The **`code`** read-only property of the DOMException interface returns one of the legacy error code constants, or 0 if none match.

#### Deprecated[](#deprecated)

[MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException/code)

Inherited from DOMException.code

### `Readonly`DATA\_CLONE\_ERR[](#data_clone_err)

DATA\_CLONE\_ERR: 25

Inherited from DOMException.DATA\_CLONE\_ERR

### `Readonly`DOMSTRING\_SIZE\_ERR[](#domstring_size_err)

DOMSTRING\_SIZE\_ERR: 2

Inherited from DOMException.DOMSTRING\_SIZE\_ERR

### `Readonly`errorDetail[](#errordetail)

errorDetail: [RTCErrorDetailType](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.RTCErrorDetailType/)

The RTCError interface's read-only **`errorDetail`** property is a string indicating the WebRTC-specific error code that occurred.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCError/errorDetail)

### `Readonly`HIERARCHY\_REQUEST\_ERR[](#hierarchy_request_err)

HIERARCHY\_REQUEST\_ERR: 3

Inherited from DOMException.HIERARCHY\_REQUEST\_ERR

### `Readonly`INDEX\_SIZE\_ERR[](#index_size_err)

INDEX\_SIZE\_ERR: 1

Inherited from DOMException.INDEX\_SIZE\_ERR

### `Readonly`INUSE\_ATTRIBUTE\_ERR[](#inuse_attribute_err)

INUSE\_ATTRIBUTE\_ERR: 10

Inherited from DOMException.INUSE\_ATTRIBUTE\_ERR

### `Readonly`INVALID\_ACCESS\_ERR[](#invalid_access_err)

INVALID\_ACCESS\_ERR: 15

Inherited from DOMException.INVALID\_ACCESS\_ERR

### `Readonly`INVALID\_CHARACTER\_ERR[](#invalid_character_err)

INVALID\_CHARACTER\_ERR: 5

Inherited from DOMException.INVALID\_CHARACTER\_ERR

### `Readonly`INVALID\_MODIFICATION\_ERR[](#invalid_modification_err)

INVALID\_MODIFICATION\_ERR: 13

Inherited from DOMException.INVALID\_MODIFICATION\_ERR

### `Readonly`INVALID\_NODE\_TYPE\_ERR[](#invalid_node_type_err)

INVALID\_NODE\_TYPE\_ERR: 24

Inherited from DOMException.INVALID\_NODE\_TYPE\_ERR

### `Readonly`INVALID\_STATE\_ERR[](#invalid_state_err)

INVALID\_STATE\_ERR: 11

Inherited from DOMException.INVALID\_STATE\_ERR

### `Readonly`message[](#message)

message: string

The **`message`** read-only property of the DOMException interface returns a string representing a message or description associated with the given error name.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException/message)

Inherited from DOMException.message

### `Readonly`name[](#name)

name: string

The **`name`** read-only property of the DOMException interface returns a string that contains one of the strings associated with an error name.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException/name)

Inherited from DOMException.name

### `Readonly`NAMESPACE\_ERR[](#namespace_err)

NAMESPACE\_ERR: 14

Inherited from DOMException.NAMESPACE\_ERR

### `Readonly`NETWORK\_ERR[](#network_err)

NETWORK\_ERR: 19

Inherited from DOMException.NETWORK\_ERR

### `Readonly`NO\_DATA\_ALLOWED\_ERR[](#no_data_allowed_err)

NO\_DATA\_ALLOWED\_ERR: 6

Inherited from DOMException.NO\_DATA\_ALLOWED\_ERR

### `Readonly`NO\_MODIFICATION\_ALLOWED\_ERR[](#no_modification_allowed_err)

NO\_MODIFICATION\_ALLOWED\_ERR: 7

Inherited from DOMException.NO\_MODIFICATION\_ALLOWED\_ERR

### `Readonly`NOT\_FOUND\_ERR[](#not_found_err)

NOT\_FOUND\_ERR: 8

Inherited from DOMException.NOT\_FOUND\_ERR

### `Readonly`NOT\_SUPPORTED\_ERR[](#not_supported_err)

NOT\_SUPPORTED\_ERR: 9

Inherited from DOMException.NOT\_SUPPORTED\_ERR

### `Readonly`QUOTA\_EXCEEDED\_ERR[](#quota_exceeded_err)

QUOTA\_EXCEEDED\_ERR: 22

Inherited from DOMException.QUOTA\_EXCEEDED\_ERR

### `Readonly`receivedAlert[](#receivedalert)

receivedAlert: number | null

The RTCError read-only property **`receivedAlert`** specifies the fatal DTLS error which resulted in an alert being received from the remote peer.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCError/receivedAlert)

### `Readonly`sctpCauseCode[](#sctpcausecode)

sctpCauseCode: number | null

The read-only **`sctpCauseCode`** property in an RTCError object provides the SCTP cause code explaining why the SCTP negotiation failed, if the RTCError represents an SCTP error.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCError/sctpCauseCode)

### `Readonly`sdpLineNumber[](#sdplinenumber)

sdpLineNumber: number | null

The RTCError interface's read-only property **`sdpLineNumber`** specifies the line number within the SDP at which a syntax error occurred while parsing it.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCError/sdpLineNumber)

### `Readonly`SECURITY\_ERR[](#security_err)

SECURITY\_ERR: 18

Inherited from DOMException.SECURITY\_ERR

### `Readonly`sentAlert[](#sentalert)

sentAlert: number | null

The read-only **`sentAlert`** property in an RTCError object specifies the DTLS alert number occurred while sending data to the remote peer, if the error represents an outbound DTLS error.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCError/sentAlert)

### `Optional`stack[](#stack)

stack?: string

Inherited from DOMException.stack

### `Readonly`SYNTAX\_ERR[](#syntax_err)

SYNTAX\_ERR: 12

Inherited from DOMException.SYNTAX\_ERR

### `Readonly`TIMEOUT\_ERR[](#timeout_err)

TIMEOUT\_ERR: 23

Inherited from DOMException.TIMEOUT\_ERR

### `Readonly`TYPE\_MISMATCH\_ERR[](#type_mismatch_err)

TYPE\_MISMATCH\_ERR: 17

Inherited from DOMException.TYPE\_MISMATCH\_ERR

### `Readonly`URL\_MISMATCH\_ERR[](#url_mismatch_err)

URL\_MISMATCH\_ERR: 21

Inherited from DOMException.URL\_MISMATCH\_ERR

### `Readonly`VALIDATION\_ERR[](#validation_err)

VALIDATION\_ERR: 16

Inherited from DOMException.VALIDATION\_ERR

### `Readonly`WRONG\_DOCUMENT\_ERR[](#wrong_document_err)

WRONG\_DOCUMENT\_ERR: 4

Inherited from DOMException.WRONG\_DOCUMENT\_ERR
