Comprehend / Client / exceptions / InvalidRequestException
InvalidRequestException#
- class Comprehend.Client.exceptions.InvalidRequestException#
The request is invalid.
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': 'INVALID_DOCUMENT', 'Detail': { 'Reason': 'DOCUMENT_SIZE_EXCEEDED'|'UNSUPPORTED_DOC_TYPE'|'PAGE_LIMIT_EXCEEDED'|'TEXTRACT_ACCESS_DENIED' }, 'Error': { 'Code': 'string', 'Message': 'string' } }
Structure
(dict) –
The request is invalid.
Message (string) –
Reason (string) –
Detail (dict) –
Provides additional detail about why the request failed:
Document size is too large - Check the size of your file and resubmit the request.
Document type is not supported - Check the file type and resubmit the request.
Too many pages in the document - Check the number of pages in your file and resubmit the request.
Access denied to Amazon Textract - Verify that your account has permission to use Amazon Textract API operations and resubmit the request.
Reason (string) –
Reason code is
INVALID_DOCUMENT
.
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.