{
  "code": 31,
  "class": "Voice",
  "subclasses": [
    {
      "class": "General",
      "errors": [
        {
          "code": 0,
          "name": "UnknownError",
          "description": "Unknown Error",
          "explanation": "An unknown error has occurred. See error details for more information."
        },
        {
          "code": 1,
          "name": "ApplicationNotFoundError",
          "description": "Application Not Found",
          "explanation": ""
        },
        {
          "code": 2,
          "name": "ConnectionDeclinedError",
          "description": "Connection Declined",
          "explanation": ""
        },
        {
          "code": 3,
          "name": "ConnectionTimeoutError",
          "description": "Connection Timeout",
          "explanation": "The server could not produce a response within a suitable amount of time."
        },
        {
          "code": 5,
          "name": "ConnectionError",
          "description": "Connection error",
          "explanation": "A connection error occurred during the call"
        },
        {
          "code": 8,
          "name": "CallCancelledError",
          "description": "Call cancelled",
          "explanation": "Unable to answer because the call has ended",
          "causes": [
            "The incoming call was cancelled because it was not answered in time or it was accepted/rejected by another application instance registered with the same identity."
          ]
        },
        {
          "code": 9,
          "name": "TransportError",
          "description": "Transport error",
          "explanation": "No transport available to send or receive messages"
        }
      ]
    },
    {
      "code": 1,
      "class": "MalformedRequest",
      "errors": [
        {
          "code": 0,
          "name": "MalformedRequestError",
          "description": "The request had malformed syntax.",
          "explanation": "The request could not be understood due to malformed syntax.",
          "causes": [
            "Invalid content or MessageType passed to sendMessage method."
          ],
          "solutions": [
            "Ensure content and MessageType passed to sendMessage method are valid."
          ]
        },
        {
          "code": 1,
          "name": "MissingParameterArrayError",
          "description": "Missing parameter array in request",
          "explanation": ""
        },
        {
          "code": 2,
          "name": "AuthorizationTokenMissingError",
          "description": "Authorization token missing in request.",
          "explanation": ""
        },
        {
          "code": 3,
          "name": "MaxParameterLengthExceededError",
          "description": "Maximum parameter length has been exceeded.",
          "explanation": "Length of parameters cannot exceed MAX_PARAM_LENGTH."
        },
        {
          "code": 4,
          "name": "InvalidBridgeTokenError",
          "description": "Invalid bridge token",
          "explanation": ""
        },
        {
          "code": 5,
          "name": "InvalidClientNameError",
          "description": "Invalid client name",
          "explanation": "Client name should not contain control, space, delims, or unwise characters.",
          "causes": [
            "Client name contains invalid characters."
          ],
          "solutions": [
            "Make sure that client name does not contain any of the invalid characters."
          ]
        },
        {
          "code": 7,
          "name": "ReconnectParameterInvalidError",
          "description": "The reconnect parameter is invalid",
          "explanation": ""
        }
      ]
    },
    {
      "code": 2,
      "class": "Authorization",
      "errors": [
        {
          "code": 1,
          "name": "AuthorizationError",
          "description": "Authorization error",
          "explanation": "The request requires user authentication. The server understood the request, but is refusing to fulfill it."
        },
        {
          "code": 3,
          "name": "NoValidAccountError",
          "description": "No valid account",
          "explanation": ""
        },
        {
          "code": 4,
          "name": "InvalidJWTTokenError",
          "description": "Invalid JWT token",
          "explanation": ""
        },
        {
          "code": 5,
          "name": "JWTTokenExpiredError",
          "description": "JWT token expired",
          "explanation": ""
        },
        {
          "code": 6,
          "name": "RateExceededError",
          "description": "Rate exceeded authorized limit.",
          "explanation": "The request performed exceeds the authorized limit.",
          "causes": [
            "Rate limit exceeded."
          ],
          "solutions": [
            "Ensure message send rate does not exceed authorized limits."
          ]
        },
        {
          "code": 7,
          "name": "JWTTokenExpirationTooLongError",
          "description": "JWT token expiration too long",
          "explanation": ""
        },
        {
          "code": 9,
          "name": "ReconnectAttemptError",
          "description": "Reconnect attempt is not authorized.",
          "explanation": ""
        },
        {
          "code": 10,
          "name": "CallMessageEventTypeInvalidError",
          "description": "Call Message Event Type is invalid.",
          "explanation": "The Call Message Event Type is invalid and is not understood by Twilio Voice.",
          "causes": [
            "The Call Message Event Type is invalid and is not understood by Twilio Voice."
          ],
          "solutions": [
            "Ensure the Call Message Event Type is Valid and understood by Twilio Voice and try again."
          ]
        },
        {
          "code": 11,
          "name": "CallMessageUnexpectedStateError",
          "description": "Call is not in the expected state.",
          "explanation": "The Call should be at least in the ringing state to send Call Message.",
          "causes": [
            "The Call should be at least in the ringing state to subscribe and send Call Message."
          ],
          "solutions": [
            "Ensure the Call is at least in the ringing state and the subscription is successful and try again."
          ]
        },
        {
          "code": 12,
          "name": "PayloadSizeExceededError",
          "description": "Call Message Event Payload size exceeded authorized limit.",
          "explanation": "The request performed to send a Call Message Event exceeds the payload size authorized limit",
          "causes": [
            "The payload size of Call Message Event exceeds the authorized limit."
          ],
          "solutions": [
            "Reduce payload size of Call Message Event to be within the authorized limit and try again."
          ]
        }
      ]
    },
    {
      "code": 3,
      "class": "Registration",
      "errors": [
        {
          "code": 1,
          "name": "RegistrationError",
          "description": "Registration error",
          "explanation": ""
        },
        {
          "code": 2,
          "name": "UnsupportedCancelMessageError",
          "description": "Unsupported Cancel Message Error",
          "explanation": "This version of the SDK no longer supports processing cancel push notification messages. You must register via Voice.register(...) on Android or [TwilioVoice registerWithAccessToken:deviceToken:completion:] on iOS with this version of the SDK to stop receiving cancel push notification messages. Cancellations are now handled internally and reported to you on behalf of the SDK.",
          "causes": [
            "The identity associated with the Twilio Voice SDK is still registered to receive cancel push notification messages."
          ],
          "solutions": [
            "The application must register via Voice.register(...) on Android or [TwilioVoice registerWithAccessToken:deviceToken:completion:] on iOS to stop receiving cancel push notification messages."
          ]
        }
      ]
    },
    {
      "code": 4,
      "class": "UserMedia",
      "errors": [
        {
          "code": 1,
          "name": "PermissionDeniedError",
          "description": "UserMedia Permission Denied Error",
          "explanation": "The browser or end-user denied permissions to user media. Therefore we were unable to acquire input audio.",
          "causes": [
            "The user denied the getUserMedia request.",
            "The browser denied the getUserMedia request."
          ],
          "solutions": [
            "The user should accept the request next time prompted. If the browser saved the deny, the user should change that permission in their browser.",
            "The user should to verify that the browser has permission to access the microphone at this address."
          ]
        },
        {
          "code": 2,
          "name": "AcquisitionFailedError",
          "description": "UserMedia Acquisition Failed Error",
          "explanation": "The browser and end-user allowed permissions, however getting the media failed. Usually this is due to bad constraints, but can sometimes fail due to browser, OS or hardware issues.",
          "causes": [
            "NotFoundError - The deviceID specified was not found.",
            "The getUserMedia constraints were overconstrained and no devices matched."
          ],
          "solutions": [
            "Ensure the deviceID being specified exists.",
            "Try acquiring media with fewer constraints."
          ]
        }
      ]
    }
  ]
}
