When terminating the Session (Section 6.6), the application MAY use any error message and SHOULD use a relevant code, as defined below:
- NO_ERROR (0x0):
-
The session is being terminated without an error.
- INTERNAL_ERROR (0x1):
-
An implementation specific error occurred.
- UNAUTHORIZED (0x2):
-
The client is not authorized to establish a session.
- PROTOCOL_VIOLATION (0x3):
-
The remote endpoint performed an action that was disallowed by the specification and no more specific code applies.
Codes from 0x200 to 0x4FF are organized into ranges by category:
-
0x200-0x2FF: Data stream and datagram errors
-
0x300-0x3FF: Control stream and control message errors
-
0x400-0x4FF: Errors that can occur in either
The values reserved for greasing (Section 13) that fall within these ranges are not assigned to a category. An endpoint that receives any other unrecognized code within one of these ranges can use the range to identify the category of the error.
- INVALID_REQUEST_ID (0x4):
-
The endpoint received a Request ID with an incorrect least significant bit for the sender, or a duplicate Request ID. See Section 6.4.2.1.
- DUPLICATE_TRACK_ALIAS (0x5):
-
The endpoint attempted to use a Track Alias that was already in use.
- MALFORMED_KEY_VALUE (0x6):
-
A Key-Value-Pair (Figure 4), such as a Setup Option or a Property, has a Value that does not match the definition of its Type.
- INVALID_PATH (0x8):
-
The PATH parameter was used by a server, on a WebTransport session, or the server does not support the path.
- MALFORMED_PATH (0x9):
-
The PATH parameter does not conform to the rules in Section 9.1.2.
- GOAWAY_TIMEOUT (0x10):
-
The session was closed because the peer took too long to close the session in response to a GOAWAY (Section 9.2) message. See session migration (Section 6.6.1).
- CONTROL_MESSAGE_TIMEOUT (0x11):
-
The session was closed because the peer took too long to respond to a control message.
- DATA_STREAM_TIMEOUT (0x12):
-
The session was closed because the peer took too long to send data expected on an open Data Stream (see Section 11). This includes fields of a stream header or an object header within a data stream. If an endpoint times out waiting for a new object header on an open subgroup stream, it MAY send a STOP_SENDING on that stream or terminate the subscription.
- AUTH_TOKEN_CACHE_OVERFLOW (0x13):
-
The Session limit Section 9.1.3 of the size of all registered Authorization tokens has been exceeded.
- DUPLICATE_AUTH_TOKEN_ALIAS (0x14):
-
Authorization Token attempted to register an Alias that was in use (see Section 8.9).
- MALFORMED_AUTH_TOKEN (0x16):
-
Invalid Auth Token serialization (see Section 8.9).
- UNKNOWN_AUTH_TOKEN_ALIAS (0x17):
-
No registered token found for the provided Alias (see Section 8.9).
- EXPIRED_AUTH_TOKEN (0x18):
-
Authorization token has expired (Section 8.9).
- INVALID_AUTHORITY (0x19):
-
The specified AUTHORITY does not correspond to this server or cannot be used in this context.
- MALFORMED_AUTHORITY (0x1A):
-
The AUTHORITY value is syntactically invalid.
- TOO_MANY_REQUEST_UPDATES (0x1B):
-
The endpoint received a REQUEST_UPDATE that exceeded the per-stream limit communicated via the MAX_REQUEST_UPDATES Setup Option (Section 9.1.7).
- INVALID_STREAM_HEADER (0x200):
-
A data stream or datagram has an unknown type or invalid Type Flags.
- MALFORMED_OBJECT (0x201):
-
The serialization of an Object on a data stream or in a datagram cannot be decoded, for example a flag references a prior Object that does not exist.
- INVALID_OBJECT_STATUS (0x202):
-
An Object has an invalid Object Status, or has Properties when its status is not Normal.
- TRUNCATED_OBJECT (0x203):
-
A data stream ended with a FIN in the middle of an Object.
- MALFORMED_MESSAGE (0x300):
-
A control message cannot be parsed or is missing a required element, for example its length does not match its contents.
- INVALID_FIELD (0x301):
-
A control message was parsed, but a field has a value that is not allowed.
- INVALID_TRACK_NAMESPACE (0x302):
-
A Track Namespace does not conform to Section 8.7.
- UNEXPECTED_MESSAGE (0x303):
-
A control message of an unknown type was received, or a message was received on the wrong stream, in the wrong order, or more times than allowed.
- ROLE_VIOLATION (0x304):
-
The peer sent a message or field that is not allowed for its role, for example a server receiving a non-empty New Session URI.
- INVALID_PARAMETER (0x305):
-
A Message Parameter (Section 9.19) is unknown, duplicated, not allowed in the message, or has a value outside its allowed range.
- CLOSED_CONTROL_STREAM (0x306):
-
The peer closed the control stream (Section 6.3).
- DELTA_ENCODING_OVERFLOW (0x400):
-
A value decoded from a delta encoding is less than 0 or greater than 2^64 - 1.
- FIELD_LENGTH_EXCEEDED (0x401):
-
A field or structure is longer than its maximum allowed length.
When more than one code applies, an endpoint uses DELTA_ENCODING_OVERFLOW or FIELD_LENGTH_EXCEEDED in preference to the other codes.