PinpointSMSVoiceV2 / Client / exceptions / ValidationException

ValidationException#

class PinpointSMSVoiceV2.Client.exceptions.ValidationException#

A validation exception for a field.

Example

try:
  ...
except client.exceptions.ValidationException as e:
  print(e.response)
response#

The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.

Syntax

{
    'Message': 'string',
    'Reason': 'CANNOT_ADD_OPTED_OUT_NUMBER'|'CANNOT_PARSE'|'COUNTRY_CODE_MISMATCH'|'DESTINATION_COUNTRY_BLOCKED'|'FIELD_VALIDATION_FAILED'|'ATTACHMENT_TYPE_NOT_SUPPORTED'|'INVALID_ARN'|'INVALID_FILTER_VALUES'|'INVALID_IDENTITY_FOR_DESTINATION_COUNTRY'|'INVALID_NEXT_TOKEN'|'INVALID_PARAMETER'|'INVALID_REQUEST'|'INVALID_REGISTRATION_ASSOCIATION'|'MAXIMUM_SIZE_EXCEEDED'|'MISSING_PARAMETER'|'PARAMETERS_CANNOT_BE_USED_TOGETHER'|'PHONE_NUMBER_CANNOT_BE_OPTED_IN'|'PHONE_NUMBER_CANNOT_BE_RELEASED'|'PRICE_OVER_THRESHOLD'|'RESOURCE_NOT_ACCESSIBLE'|'REQUESTED_SPEND_LIMIT_HIGHER_THAN_SERVICE_LIMIT'|'SENDER_ID_NOT_REGISTERED'|'SENDER_ID_NOT_SUPPORTED'|'SENDER_ID_REQUIRES_REGISTRATION'|'TWO_WAY_TOPIC_NOT_PRESENT'|'TWO_WAY_NOT_ENABLED'|'TWO_WAY_NOT_SUPPORTED_IN_COUNTRY'|'TWO_WAY_NOT_SUPPORTED_IN_REGION'|'TWO_WAY_CHANNEL_NOT_PRESENT'|'UNKNOWN_REGISTRATION_FIELD'|'UNKNOWN_REGISTRATION_SECTION'|'UNKNOWN_REGISTRATION_TYPE'|'UNKNOWN_REGISTRATION_VERSION'|'UNKNOWN_OPERATION'|'REGISTRATION_FIELD_CANNOT_BE_DELETED'|'VERIFICATION_CODE_MISMATCH'|'VOICE_CAPABILITY_NOT_AVAILABLE'|'OTHER',
    'Fields': [
        {
            'Name': 'string',
            'Message': 'string'
        },
    ],
    'Error': {
        'Code': 'string',
        'Message': 'string'
    }
}

Structure

  • (dict) –

    A validation exception for a field.

    • Message (string) –

    • Reason (string) –

      The reason for the exception.

    • Fields (list) –

      The field that failed validation.

      • (dict) –

        The field associated with the validation exception.

        • Name (string) –

          The name of the field.

        • Message (string) –

          The message associated with the validation exception with information to help determine its cause.

    • Error (dict) – Normalized access to common exception attributes.

      • Code (string) – An identifier specifying the exception type.

      • Message (string) – A descriptive message explaining why the exception occured.