WickrAdminAPI / Client / exceptions / ValidationError

ValidationError

class WickrAdminAPI.Client.exceptions.ValidationError

One or more fields in the request failed validation. This error provides detailed information about which fields were invalid and why, allowing you to correct the request and retry.

Example

try:
  ...
except client.exceptions.ValidationError 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

{
    'reasons': [
        {
            'field': 'string',
            'reason': 'string'
        },
    ],
    'Error': {
        'Code': 'string',
        'Message': 'string'
    }
}

Structure

  • (dict) –

    One or more fields in the request failed validation. This error provides detailed information about which fields were invalid and why, allowing you to correct the request and retry.

    • reasons (list) –

      A list of validation error details, where each item identifies a specific field that failed validation and explains the reason for the failure.

      • (dict) –

        Contains detailed error information explaining why an operation failed, including which field caused the error and the reason for the failure.

        • field (string) –

          The name of the field that contains an error or warning.

        • reason (string) –

          A detailed description of the error or warning.

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