PartnerCentralAccountAPI / Client / exceptions / ValidationException
ValidationException¶
- class PartnerCentralAccountAPI.Client.exceptions.ValidationException¶
The request failed validation. One or more input parameters are invalid, missing, or do not meet the required format or constraints.
Example
try: ... except client.exceptions.ValidationException as e: print(e.response)
- response¶
The parsed error response. All exceptions have a top level
Errorkey that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.Syntax
{ 'Message': 'string', 'Reason': 'REQUEST_VALIDATION_FAILED'|'BUSINESS_VALIDATION_FAILED', 'ErrorDetails': [ { 'FieldValidationError': { 'Name': 'string', 'Message': 'string', 'Code': 'REQUIRED_FIELD_MISSING'|'DUPLICATE_VALUE'|'INVALID_VALUE'|'INVALID_STRING_FORMAT'|'TOO_MANY_VALUES'|'ACTION_NOT_PERMITTED'|'INVALID_ENUM_VALUE' }, 'BusinessValidationError': { 'Message': 'string', 'Code': 'INCOMPATIBLE_CONNECTION_INVITATION_REQUEST'|'INCOMPATIBLE_LEGAL_NAME'|'INCOMPATIBLE_KNOW_YOUR_BUSINESS_STATUS'|'INCOMPATIBLE_IDENTITY_VERIFICATION_STATUS'|'INVALID_ACCOUNT_LINKING_STATUS'|'INVALID_ACCOUNT_STATE'|'INCOMPATIBLE_DOMAIN' } }, ], 'Error': { 'Code': 'string', 'Message': 'string' } }
Structure
(dict) –
The request failed validation. One or more input parameters are invalid, missing, or do not meet the required format or constraints.
Message (string) –
Reason (string) –
The reason for the validation failure.
ErrorDetails (list) –
A list of detailed validation errors that occurred during request processing.
(dict) –
Contains information about a validation error, which can be either a field-level or business rule validation error.
Note
This is a Tagged Union structure. Only one of the following top level keys will be set:
FieldValidationError,BusinessValidationError. If a client receives an unknown member it will setSDK_UNKNOWN_MEMBERas the top level key, which maps to the name or tag of the unknown member. The structure ofSDK_UNKNOWN_MEMBERis as follows:'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
FieldValidationError (dict) –
Details about a field-level validation error, if applicable.
Name (string) –
The name of the field that failed validation.
Message (string) –
A description of the field validation error.
Code (string) –
A code identifying the specific field validation error.
BusinessValidationError (dict) –
Details about a business rule validation error, if applicable.
Message (string) –
A description of the business validation error.
Code (string) –
A code identifying the specific business validation error.
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.