The Transport Session can be terminated at any point. When native QUIC is used, the session is closed using the CONNECTION_CLOSE frame ([QUIC], Section 19.19). When WebTransport is used, the session is closed using the CLOSE_WEBTRANSPORT_SESSION capsule ([WebTransport], Section 5).
When terminating the Session, the application MAY use any error message and SHOULD use a relevant code, as defined below:
| Code | Reason |
|---|---|
| 0x0 | No Error |
| 0x1 | Internal Error |
| 0x2 | Unauthorized |
| 0x3 | Protocol Violation |
| 0x4 | Invalid Request ID |
| 0x5 | Duplicate Track Alias |
| 0x6 | Key-Value Formatting Error |
| 0x7 | Too Many Requests |
| 0x8 | Invalid Path |
| 0x9 | Malformed Path |
| 0x10 | GOAWAY Timeout |
| 0x11 | Control Message Timeout |
| 0x12 | Data Stream Timeout |
| 0x13 | Auth Token Cache Overflow |
| 0x14 | Duplicate Auth Token Alias |
| 0x15 | Version Negotiation Failed |
| 0x16 | Malformed Auth Token |
| 0x17 | Unknown Auth Token Alias |
| 0x18 | Expired Auth Token |
-
No Error: The session is being terminated without an error.
-
Internal Error: An implementation specific error occurred.
-
Unauthorized: The client is not authorized to establish a session.
-
Protocol Violation: The remote endpoint performed an action that was disallowed by the specification.
-
Invalid Request ID: The session was closed because the endpoint used a Request ID that was smaller than or equal to a previously received request ID, or the least-significant bit of the request ID was incorrect for the endpoint.
-
Duplicate Track Alias: The endpoint attempted to use a Track Alias that was already in use.
-
Key-Value Formatting Error: the key-value pair has a formatting error.
-
Too Many Requests: The session was closed because the endpoint used a Request ID equal to or larger than the current Maximum Request ID.
-
Invalid Path: The PATH parameter was used by a server, on a WebTransport session, or the server does not support the path.
-
Malformed Path: The PATH parameter does not conform to the rules in Section 8.3.2.1.
-
GOAWAY Timeout: The session was closed because the peer took too long to close the session in response to a GOAWAY (Section 8.4) message. See session migration (Section 3.5).
-
Control Message Timeout: The session was closed because the peer took too long to respond to a control message.
-
Data Stream Timeout: The session was closed because the peer took too long to send data expected on an open Data Stream (see Section 9). 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 - the Session limit Section 8.3.2.3 of the size of all registered Authorization tokens has been exceeded.
-
Duplicate Auth Token Alias - Authorization Token attempted to register an Alias that was in use (see Section 8.2.1.1).
-
Version Negotiation Failed: The client didn't offer a version supported by the server.
-
Malformed Auth Token - Invalid Auth Token serialization during registration (see Section 8.2.1.1).
-
Unknown Auth Token Alias - No registered token found for the provided Alias (see Section 8.2.1.1).
-
Expired Auth Token - Authorization token has expired Section 8.2.1.1).
An endpoint MAY choose to treat a subscription or request specific error as a session error under certain circumstances, closing the entire session in response to a condition with a single subscription or message. Implementations need to consider the impact on other outstanding subscriptions before making this choice.