odb / Client / exceptions / ValidationException
ValidationException¶
- class odb.Client.exceptions.ValidationException¶
The request has failed validation because it is missing required fields or has invalid inputs.
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': 'unknownOperation'|'cannotParse'|'fieldValidationFailed'|'other', 'fieldList': [ { 'name': 'string', 'message': 'string' }, ], 'Error': { 'Code': 'string', 'Message': 'string' } }
Structure
(dict) –
The request has failed validation because it is missing required fields or has invalid inputs.
message (string) –
reason (string) –
The reason why the validation failed.
fieldList (list) –
A list of fields that failed validation.
(dict) –
The input failed to meet the constraints specified by the service in a specified field. Make sure you provided the correct input and try again.
name (string) –
The field name for which validation failed.
message (string) –
The description of the 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.