Skip to main content

Module error_code

Module error_code 

Source
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 ErrorCode is sent with.
ErrorCode
A STUN error code, as carried in ERROR-CODE.
ErrorCodeAttribute
The ERROR-CODE attribute: 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.