Skip to content

Commit

Permalink
address DDB Exception issue (awslabs#2401)
Browse files Browse the repository at this point in the history
  • Loading branch information
chngpe authored and Jithendar12 committed Dec 2, 2024
1 parent cbf61aa commit d477b38
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

import com.amazonaws.athena.connector.lambda.ThrottlingInvoker;
import com.amazonaws.athena.connector.lambda.data.SchemaBuilder;
import com.amazonaws.athena.connector.lambda.exceptions.AthenaConnectorException;
import com.amazonaws.athena.connectors.dynamodb.model.DynamoDBIndex;
import com.amazonaws.athena.connectors.dynamodb.model.DynamoDBTable;
import com.google.common.collect.ImmutableList;
Expand All @@ -42,8 +41,6 @@
import software.amazon.awssdk.services.dynamodb.model.ScanRequest;
import software.amazon.awssdk.services.dynamodb.model.ScanResponse;
import software.amazon.awssdk.services.dynamodb.model.TableDescription;
import software.amazon.awssdk.services.glue.model.ErrorDetails;
import software.amazon.awssdk.services.glue.model.FederationSourceErrorCode;

import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -170,7 +167,7 @@ public static Schema peekTableForSchema(String tableName, ThrottlingInvoker invo
logger.warn("Failed to retrieve table schema due to KMS issue, empty schema for table: {}. Error Message: {}", tableName, runtimeException.getMessage());
}
else {
throw new AthenaConnectorException(runtimeException.getMessage(), ErrorDetails.builder().errorCode(FederationSourceErrorCode.OPERATION_TIMEOUT_EXCEPTION.toString()).build());
throw runtimeException;
}
}
return schemaBuilder.build();
Expand Down

0 comments on commit d477b38

Please sign in to comment.