AppSync / Client / exceptions / BadRequestException
BadRequestException#
- class AppSync.Client.exceptions.BadRequestException#
The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and then try again.
Example
try: ... except client.exceptions.BadRequestException 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': 'CODE_ERROR', 'detail': { 'codeErrors': [ { 'errorType': 'string', 'value': 'string', 'location': { 'line': 123, 'column': 123, 'span': 123 } }, ] }, 'Error': { 'Code': 'string', 'Message': 'string' } }
Structure
(dict) –
The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and then try again.
message (string) –
reason (string) –
Provides context for the cause of the bad request. The only supported value is
CODE_ERROR
.detail (dict) –
Provides further details for the reason behind the bad request. For reason type
CODE_ERROR
, the detail will contain a list of code errors.codeErrors (list) –
Contains the list of errors in the request.
(dict) –
Describes an AppSync error.
errorType (string) –
The type of code error.
Examples include, but aren’t limited to:
LINT_ERROR
,PARSER_ERROR
.value (string) –
A user presentable error.
Examples include, but aren’t limited to:
Parsing error: Unterminated string literal
.location (dict) –
The line, column, and span location of the error in the code.
line (integer) –
The line number in the code. Defaults to
0
if unknown.column (integer) –
The column number in the code. Defaults to
0
if unknown.span (integer) –
The span/length of the error. Defaults to
-1
if unknown.
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.