NetworkSecurityManagerCustomerAPI / Client / exceptions / ValidationException

ValidationException

class NetworkSecurityManagerCustomerAPI.Client.exceptions.ValidationException

The request failed validation. For details, see the reason and fieldList members of the response.

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': 'ACCOUNT_NOT_ONBOARDED'|'FIELD_VALIDATION_FAILED'|'OTHER',
    'fieldList': [
        {
            'name': 'string',
            'message': 'string'
        },
    ],
    'Error': {
        'Code': 'string',
        'Message': 'string'
    }
}

Structure

  • (dict) –

    The request failed validation. For details, see the reason and fieldList members of the response.

    • message (string) –

    • reason (string) –

      The reason that the request failed validation.

    • fieldList (list) –

      The list of request fields that failed validation, if any.

      • (dict) –

        Describes a single request field that failed validation.

        • name (string) –

          The name of the field that failed validation.

        • message (string) –

          A message describing the validation error for the field.

    • 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.