MarketplaceCatalog / Client / exceptions / ValidationException

ValidationException

class MarketplaceCatalog.Client.exceptions.ValidationException

An error occurred during validation.

HTTP status code: 422

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',
    'ValidationExceptionFieldList': [
        {
            'Reason': 'UnknownOperation'|'CannotParse'|'FieldValidationFailed'|'Other',
            'EntityType': 'string',
            'EntityId': 'string',
            'ChangeType': 'string',
            'Field': 'string',
            'Message': 'string'
        },
    ],
    'Error': {
        'Code': 'string',
        'Message': 'string'
    }
}

Structure

  • (dict) –

    An error occurred during validation.

    HTTP status code: 422

    • Message (string) –

    • ValidationExceptionFieldList (list) –

      A list of detailed entries describing the request fields that failed validation. Present when the failure can be attributed to one or more specific fields.

      • (dict) –

        Detailed information about a single request field that failed validation, including the field’s location, the reason it failed, and a human-readable message.

        • Reason (string) –

          The reason the field failed validation.

        • EntityType (string) –

          The entity type the failing field applies to, if the field is on a specific entity. For example, AmiProduct@1.0.

        • EntityId (string) –

          The entity identifier the failing field applies to, if the field is on a specific entity.

        • ChangeType (string) –

          The change type the failing field applies to, if the field is part of a change request. For example, AddDeliveryOptions.

        • Field (string) –

          The name of the request field that failed validation, expressed as a JSON path (for example, Details.DeliveryOptions[0].Type).

        • Message (string) –

          A human-readable message describing why the field failed validation.

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