Context / Client / exceptions / ValidationException
ValidationException¶
- class Context.Client.exceptions.ValidationException¶
The input fails to satisfy the constraints of the operation. Correct the input before you retry the request.
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': 'unknownOperation'|'cannotParse'|'fieldValidationFailed'|'other', 'fieldList': [ { 'name': 'string', 'message': 'string' }, ], 'Error': { 'Code': 'string', 'Message': 'string' } }
Structure
(dict) –
The input fails to satisfy the constraints of the operation. Correct the input before you retry the request.
message (string) –
A message that describes the error.
reason (string) –
The reason that the input failed validation. Valid values:
unknownOperation- The operation isn’t recognized.cannotParse- The request couldn’t be parsed.fieldValidationFailed- One or more fields failed validation.fieldListdescribes them.other- Another reason.messagedescribes it.
fieldList (list) –
The fields that failed validation, each with a message that describes why.
(dict) –
Describes a field in the request that failed validation.
name (string) –
The name of the field that failed validation.
message (string) –
A message that describes 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.