Connect / Client / exceptions / InvalidRequestException

InvalidRequestException#

class Connect.Client.exceptions.InvalidRequestException#

The request is not valid.

Example

try:
  ...
except client.exceptions.InvalidRequestException 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': {
        'AttachedFileInvalidRequestExceptionReason': 'INVALID_FILE_SIZE'|'INVALID_FILE_TYPE'|'INVALID_FILE_NAME'
    },
    'Error': {
        'Code': 'string',
        'Message': 'string'
    }
}

Structure

  • (dict) –

    The request is not valid.

    • Message (string) –

      The message about the request.

    • Reason (dict) –

      Reason why the request was invalid.

      Note

      This is a Tagged Union structure. Only one of the following top level keys will be set: AttachedFileInvalidRequestExceptionReason. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is as follows:

      'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
      
      • AttachedFileInvalidRequestExceptionReason (string) –

        Reason why the StartAttachedFiledUpload request was invalid.

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