module.exports = [
  {
    "code": 51,
    "class": "Twilio Authorization",
    "subclasses": [
      {
        "code": 0,
        "class": "Authorization",
        "errors": [
          {
            "code": 7,
            "name": "AccessTokenRejected",
            "description": "Token authentication is rejected by authentication service",
            "explanation": "The authentication service has rejected the provided Access Token. To check whether the Access Token is structurally correct, you can use the tools available at https://jwt.io. For the details of Twilio's specific Access Token implementation including the grant format, check https://www.twilio.com/docs/iam/access-tokens."
          }
        ]
      }
    ]
  },
  {
    "code": 20,
    "class": "Twilio Authorization",
    "subclasses": [
      {
        "code": 1,
        "class": "Authorization",
        "errors": [
          {
            "code": 1,
            "name": "AccessTokenInvalid",
            "description": "Invalid access token",
            "explanation": "Twilio was unable to validate your Access Token"
          },
          {
            "code": 2,
            "name": "AccessTokenHeaderInvalid",
            "description": "Invalid access token header",
            "explanation": "The header of the Access Token provided to the Twilio API was invalid"
          },
          {
            "code": 3,
            "name": "AccessTokenIssuerInvalid",
            "description": "Invalid access token issuer/subject",
            "explanation": "The issuer or subject of the Access Token provided to the Twilio API was invalid"
          },
          {
            "code": 4,
            "name": "AccessTokenExpired",
            "description": "Access token expired or expiration date invalid",
            "explanation": "The Access Token provided to the Twilio API has expired, the expiration time specified in the token was invalid, or the expiration time specified was too far in the future"
          },
          {
            "code": 5,
            "name": "AccessTokenNotYetValid",
            "description": "Access token not yet valid",
            "explanation": "The Access Token provided to the Twilio API is not yet valid"
          },
          {
            "code": 6,
            "name": "AccessTokenGrantsInvalid",
            "description": "Invalid access token grants",
            "explanation": "The Access Token signature and issuer were valid, but the grants specified in the token were invalid, unparseable, or did not authorize the action being requested"
          },
          {
            "code": 7,
            "name": "AccessTokenSignatureInvalid",
            "description": "Invalid access token signature",
            "explanation": "The signature for the Access Token provided was invalid."
          },
          {
            "code": 51,
            "name": "AuthenticationFailed",
            "description": "Authentication Failed",
            "explanation": "The Authentication with the provided JWT failed"
          },
          {
            "code": 57,
            "name": "ExpirationTimeExceedsMaxTimeAllowed",
            "description": "Expiration Time Exceeds Maximum Time Allowed",
            "explanation": "The expiration time provided when creating the JWT exceeds the maximum duration allowed"
          }
        ]
      },
      {
        "code": 4,
        "class": "Forbidden",
        "errors": [
          {
            "code": 3,
            "name": "Forbidden",
            "description": "403 Forbidden",
            "explanation": "The account lacks permission to access the Twilio API. Typically this means the account has been suspended or closed. For assistance, please contact support"
          }
        ]
      }
    ]
  },
  {
    "code": 31,
    "class": "Voice Client & Server",
    "subclasses": [
      {
        "code": 2,
        "class": "SignatureValidation",
        "errors": [
          {
            "code": 2,
            "name": "AccessTokenSignatureValidationFailed",
            "description": "Signature validation failed.",
            "explanation": "The provided access token failed signature validation.",
            "causes": [
              "The access token has an invalid Account SID, API Key, or API Key Secret."
            ],
            "solutions": [
              "Ensure the Account SID, API Key, and API Key Secret are valid when generating your access token."
            ]
          }
        ]
      },
      {
        "code": 4,
        "class": "Client",
        "errors": [
          {
            "code": 0,
            "name": "BadRequest",
            "description": "Bad Request (HTTP/SIP)",
            "explanation": "The request could not be understood due to malformed syntax."
          },
          {
            "code": 3,
            "name": "Forbidden",
            "description": "Forbidden (HTTP/SIP)",
            "explanation": "The server understood the request, but is refusing to fulfill it."
          },
          {
            "code": 4,
            "name": "NotFound",
            "description": "Not Found (HTTP/SIP)",
            "explanation": "The server has not found anything matching the request.",
            "causes": [
              "The outbound call was made to an invalid phone number.",
              "The TwiML application sid is missing a Voice URL."
            ],
            "solutions": [
              "Ensure the phone number dialed is valid.",
              "Ensure the TwiML application is configured correctly with a Voice URL link."
            ]
          },
          {
            "code": 8,
            "name": "RequestTimeout",
            "description": "Request Timeout (HTTP/SIP)",
            "explanation": "A request timeout occurred."
          },
          {
            "code": 9,
            "name": "Conflict",
            "description": "Conflict (HTTP)",
            "explanation": "The request could not be processed because of a conflict in the current state of the resource. Another request may be in progress."
          },
          {
            "code": 26,
            "name": "UpgradeRequired",
            "description": "Upgrade Required (HTTP)",
            "explanation": "This error is raised when an HTTP 426 response is received. The reason for this is most likely because of an incompatible TLS version. To mitigate this, you may need to upgrade the OS or download a more recent version of the SDK."
          },
          {
            "code": 29,
            "name": "TooManyRequests",
            "description": "Too Many Requests (HTTP)",
            "explanation": "Too many requests were sent in a given amount of time."
          },
          {
            "code": 80,
            "name": "TemporarilyUnavailable",
            "description": "Temporarily Unavailable (SIP)",
            "explanation": "The callee is currently unavailable."
          },
          {
            "code": 81,
            "name": "CallTransactionDoesNotExist",
            "description": "Call/Transaction Does Not Exist (SIP)",
            "explanation": "The call no longer exists."
          },
          {
            "code": 84,
            "name": "AddressIncomplete",
            "description": "Address Incomplete (SIP)",
            "explanation": "The provided phone number is malformed.",
            "causes": [
              "The outbound call was made with a phone number that has an invalid format."
            ],
            "solutions": [
              "Ensure the phone number dialed is formatted correctly."
            ]
          },
          {
            "code": 86,
            "name": "BusyHere",
            "description": "Busy Here (SIP)",
            "explanation": "The callee is busy."
          },
          {
            "code": 87,
            "name": "RequestTerminated",
            "description": "Request Terminated (SIP)",
            "explanation": "The request has terminated as a result of a bye or cancel."
          }
        ]
      },
      {
        "code": 5,
        "class": "Server",
        "errors": [
          {
            "code": 0,
            "name": "InternalServerError",
            "description": "Internal Server Error (HTTP/SIP)",
            "explanation": "The server could not fulfill the request due to some unexpected condition."
          },
          {
            "code": 2,
            "name": "BadGateway",
            "description": "Bad Gateway (HTTP/SIP)",
            "explanation": "The server is acting as a gateway or proxy, and received an invalid response from a downstream server while attempting to fulfill the request."
          },
          {
            "code": 3,
            "name": "ServiceUnavailable",
            "description": "Service Unavailable (HTTP/SIP)",
            "explanation": "The server is currently unable to handle the request due to a temporary overloading or maintenance of the server. This error can also be caused by the Application SID provided in the access token pointing to an inaccessible URL."
          },
          {
            "code": 4,
            "name": "GatewayTimeout",
            "description": "Gateway Timeout (HTTP/SIP)",
            "explanation": "The server, while acting as a gateway or proxy, did not receive a timely response from an upstream server."
          },
          {
            "code": 30,
            "name": "DNSResolutionError",
            "description": "DNS Resolution Error (HTTP/SIP)",
            "explanation": "Could not connect to the server."
          }
        ]
      },
      {
        "code": 6,
        "class": "SIP Server",
        "errors": [
          {
            "code": 0,
            "name": "BusyEverywhere",
            "description": "Busy Everywhere (SIP)",
            "explanation": "All possible destinations are busy."
          },
          {
            "code": 3,
            "name": "Decline",
            "description": "Decline (SIP)",
            "explanation": "The callee does not wish to participate in the call."
          },
          {
            "code": 4,
            "name": "DoesNotExistAnywhere",
            "description": "Does Not Exist Anywhere (SIP)",
            "explanation": "The requested callee does not exist anywhere."
          }
        ]
      }
    ]
  },
  {
    "code": 21,
    "class": "Twilio REST",
    "subclasses": [
      {
        "code": 2,
        "class": "TwiML",
        "errors": [
          {
            "code": 18,
            "name": "InvalidApplicationSid",
            "description": "Invalid ApplicationSid",
            "explanation": "You attempted to initiate an outbound phone call with an invalid ApplicationSid. The application may not exist anymore or may not be available within your account"
          }
        ]
      }
    ]
  },
  {
    "code": 13,
    "class": "Voice Client & Server",
    "subclasses": [
      {
        "code": 2,
        "class": "DialVerb",
        "errors": [
          {
            "code": 14,
            "name": "InvalidCallerIdError",
            "description": "The provided caller identifier is invalid.",
            "explanation": "CallerId must be the calling number, called number, or a validated outgoing number. Additionally, if the calling leg is a client leg, the caller ID is required and must be a validated outgoing number. See the Dial Verb API Reference for more information.",
            "causes": [
              "Carriers may send invalid Caller IDs on Incoming calls to Twilio. If a specific Caller ID is not explicitly defined on the <Dial> verb, the invalid Caller ID will be passed to the destination. This may cause some destination providers to reject the call, and Twilio will mark it as failed."
            ],
            "solutions": [
              "To work around this, your application should recognize invalid caller IDs, and substitute them with a valid Caller ID to construct the subsequent <Dial>."
            ]
          },
          {
            "code": 24,
            "name": "InvalidPhoneNumberError",
            "description": "Twilio does not support calling this number or the number is invalid.",
            "explanation": "This error occurs when the provided number is not in E.164 format, or if none of Twilio's carrier partners are able to deliver the call.",
            "causes": [
              "The provided phone number is not in E.164 format or if none of Twilio's carrier partners are able to deliver the call."
            ],
            "solutions": [
              "Use E.164 formatting and ensure the destination is a valid, in-service destination."
            ]
          }
        ]
      }
    ]
  },
  {
    "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."
            ]
          }
        ]
      }
    ]
  },
  {
    "code": 53,
    "class": "Voice WebRTC",
    "subclasses": [
      {
        "class": "Signaling",
        "errors": [
          {
            "code": 0,
            "name": "ConnectionError",
            "description": "Signaling connection error",
            "explanation": "Raised whenever a signaling connection error occurs that is not covered by a more specific error code."
          },
          {
            "code": 1,
            "name": "ConnectionDisconnected",
            "description": "Signaling connection disconnected",
            "explanation": "Raised whenever the signaling connection is unexpectedly disconnected.",
            "causes": [
              "The device running your application lost its Internet connection."
            ],
            "solutions": [
              "Ensure the device running your application has access to a stable Internet connection."
            ]
          }
        ]
      },
      {
        "code": 4,
        "class": "Media",
        "errors": [
          {
            "code": 0,
            "name": "ClientLocalDescFailed",
            "description": "Client is unable to create or apply a local media description",
            "explanation": "Raised whenever a Client is unable to create or apply a local media description.",
            "causes": [
              "The Client may not be using a supported WebRTC implementation.",
              "The Client may not have the necessary resources to create or apply a new media description."
            ],
            "solutions": [
              "If you are experiencing this error using the JavaScript SDK, ensure you are running it with a supported WebRTC implementation."
            ]
          },
          {
            "code": 1,
            "name": "ServerLocalDescFailed",
            "description": "Server is unable to create or apply a local media description",
            "explanation": "Raised whenever the Server is unable to create or apply a local media description.",
            "causes": [
              "A server-side error has occurred."
            ],
            "solutions": [
              "If the problem persists, try connecting to another region."
            ]
          },
          {
            "code": 2,
            "name": "ClientRemoteDescFailed",
            "description": "Client is unable to apply a remote media description",
            "explanation": "Raised whenever the Client receives a remote media description but is unable to apply it.",
            "causes": [
              "The Client may not be using a supported WebRTC implementation.",
              "The Client may be connecting peer-to-peer with another Participant that is not using a supported WebRTC implementation.",
              "The Client may not have the necessary resources to apply a new media description."
            ],
            "solutions": [
              "If you are experiencing this error using the JavaScript SDK, ensure you are running it with a supported WebRTC implementation."
            ]
          },
          {
            "code": 3,
            "name": "ServerRemoteDescFailed",
            "description": "Server is unable to apply a remote media description",
            "explanation": "Raised whenever the Server receives a remote media description but is unable to apply it.",
            "causes": [
              "The Client may not be using a supported WebRTC implementation.",
              "The Client may not have the necessary resources to apply a new media description.",
              "A Server-side error may have caused the Server to generate an invalid media description."
            ],
            "solutions": [
              "If you are experiencing this error using the JavaScript SDK, ensure you are running it with a supported WebRTC implementation.",
              "If the problem persists, try connecting to another region."
            ]
          },
          {
            "code": 4,
            "name": "NoSupportedCodec",
            "description": "No supported codec",
            "explanation": "Raised whenever the intersection of codecs supported by the Client and the Server (or, in peer-to-peer, the Client and another Participant) is empty.",
            "causes": [
              "The C++ SDK was built without the recommended set of codecs.",
              "The JavaScript SDK is running in a browser that does not implement the recommended set of codecs."
            ],
            "solutions": [
              "If you are experiencing this error using the C++ SDK, ensure you build it with the recommended set of codecs.",
              "If you are experiencing this error using the JavaScript SDK, ensure you are using a compatible browser."
            ]
          },
          {
            "code": 5,
            "name": "ConnectionError",
            "description": "Media connection failed",
            "explanation": "Raised by the Client or Server whenever a media connection fails.",
            "causes": [
              "The Client was unable to establish a media connection.",
              "A media connection which was active failed liveliness checks."
            ],
            "solutions": [
              "If the problem persists, try connecting to another region.",
              "Check your Client's network connectivity.",
              "If you've provided custom ICE Servers then ensure that the URLs and credentials are valid."
            ]
          },
          {
            "code": 7,
            "name": "MediaDtlsTransportFailedError",
            "description": "The media connection failed due to DTLS handshake failure",
            "explanation": "There was a problem while negotiating with the remote DTLS peer. Therefore the Client will not be able to establish the media connection.",
            "causes": [
              "One or both of the DTLS peers have an invalid certificate.",
              "One or both of the DTLS peers have an outdated version of DTLS.",
              "One or both of the DTLS peers lost internet connectivity while performing a DTLS handshake."
            ],
            "solutions": [
              "Ensure that your certificate is valid.",
              "Ensure that you have a stable internet connection.",
              "Ensure that the browser or the Mobile SDK supports newer versions of DTLS."
            ]
          }
        ]
      }
    ]
  }
];