DevOpsAgentService / Client / exceptions / ValidationException

ValidationException

class DevOpsAgentService.Client.exceptions.ValidationException

A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.

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

Structure

  • (dict) –

    A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.

    • message (string) –

      A summary of the validation failure.

    • fieldList (list) –

      A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.

      • (dict) –

        Describes one specific validation failure for an input member.

        • path (string) –

          A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.

        • message (string) –

          A detailed description of the validation failure.

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