Expand description
The ERROR-CODE attribute and the codes defined by STUN, TURN and ICE.
The ERROR-CODE attribute.
An ErrorCodeAttribute is a numeric ErrorCode plus a reason phrase. The codes here span
three specs — STUN’s own (400, 401, 420, 500), ICE’s role conflict (487), and TURN’s
allocation failures (437, 441, 486, 508) — because all three share this attribute.
ERROR_REASONS maps each known code to the phrase it is normally sent with, so a responder
does not have to invent one.
Structs§
- ERROR_
REASONS - The reason phrase each known
ErrorCodeis sent with. - Error
Code - A STUN error code, as carried in
ERROR-CODE. - Error
Code Attribute - The
ERROR-CODEattribute: a numeric code and a human-readable reason.
Constants§
- CODE_
ADDR_ FAMILY_ NOT_ SUPPORTED - Error codes from RFC 6156.
- CODE_
ALLOC_ MISMATCH - Allocation Mismatch.
- CODE_
ALLOC_ QUOTA_ REACHED - Allocation Quota Reached.
- CODE_
BAD_ REQUEST - 400 Bad Request: the request was malformed.
- CODE_
CONN_ ALREADY_ EXISTS - Error codes from RFC 6062.
- CODE_
CONN_ TIMEOUT_ OR_ FAILURE - 447 Connection Timeout or Failure: the TURN TCP connection to the peer failed.
- CODE_
FORBIDDEN - Error codes from RFC 5766.
- CODE_
INSUFFICIENT_ CAPACITY - Insufficient Capacity.
- CODE_
PEER_ ADDR_ FAMILY_ MISMATCH - Peer Address Family Mismatch.
- CODE_
ROLE_ CONFLICT - 487 Role Conflict: both ICE agents claimed the same role.
- CODE_
SERVER_ ERROR - 500 Server Error: a temporary failure on the server.
- CODE_
STALE_ NONCE - 438 Stale Nonce: the nonce expired; retry with the one in this response.
- CODE_
TRY_ ALTERNATE - Possible error codes.
- CODE_
UNAUTHORISED - DEPRECATED constants. DEPRECATED, use CODE_UNAUTHORIZED.
- CODE_
UNAUTHORIZED - 401 Unauthorized: authentication is required, or the credentials were wrong.
- CODE_
UNKNOWN_ ATTRIBUTE - 420 Unknown Attribute: the request carried a comprehension-required attribute the server does not understand.
- CODE_
UNSUPPORTED_ TRANS_ PROTO - Unsupported Transport Protocol.
- CODE_
WRONG_ CREDENTIALS - Wrong Credentials.