Athena / Client / exceptions / MetadataException

MetadataException#

class Athena.Client.exceptions.MetadataException#

An exception that Athena received when it called a custom metastore. Occurs if the error is not caused by user input ( InvalidRequestException) or from the Athena platform ( InternalServerException). For example, if a user-created Lambda function is missing permissions, the Lambda 4XX exception is returned in a MetadataException.

Example

try:
  ...
except client.exceptions.MetadataException 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',
    'Error': {
        'Code': 'string',
        'Message': 'string'
    }
}

Structure

  • (dict) –

    An exception that Athena received when it called a custom metastore. Occurs if the error is not caused by user input ( InvalidRequestException) or from the Athena platform ( InternalServerException). For example, if a user-created Lambda function is missing permissions, the Lambda 4XX exception is returned in a MetadataException.

    • Message (string) –

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