DevOpsGuru / Client / exceptions / ValidationException

ValidationException#

class DevOpsGuru.Client.exceptions.ValidationException#

Contains information about data passed in to a field during a request that is not valid.

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': 'UNKNOWN_OPERATION'|'CANNOT_PARSE'|'FIELD_VALIDATION_FAILED'|'OTHER'|'INVALID_PARAMETER_COMBINATION'|'PARAMETER_INCONSISTENT_WITH_SERVICE_STATE',
    'Fields': [
        {
            'Name': 'string',
            'Message': 'string'
        },
    ],
    'Error': {
        'Code': 'string',
        'Message': 'string'
    }
}

Structure

  • (dict) –

    Contains information about data passed in to a field during a request that is not valid.

    • Message (string) –

      A message that describes the validation exception.

    • Reason (string) –

      The reason the validation exception was thrown.

    • Fields (list) –

      An array of fields that are associated with the validation exception.

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