diff --git a/metacat-connector-polaris/src/main/java/com/netflix/metacat/connector/polaris/PolarisConnectorDatabaseService.java b/metacat-connector-polaris/src/main/java/com/netflix/metacat/connector/polaris/PolarisConnectorDatabaseService.java index 8b5b5edd..2a76a342 100644 --- a/metacat-connector-polaris/src/main/java/com/netflix/metacat/connector/polaris/PolarisConnectorDatabaseService.java +++ b/metacat-connector-polaris/src/main/java/com/netflix/metacat/connector/polaris/PolarisConnectorDatabaseService.java @@ -89,17 +89,17 @@ public void delete(final ConnectorRequestContext context, final QualifiedName na try { this.polarisStoreService.deleteDatabase(name.getDatabaseName()); } catch (DataIntegrityViolationException exception) { - if (exception.getMessage().contains("violates foreign key constraint") - || (exception.getCause() instanceof SQLException - && "23503".equals(((SQLException) exception.getCause()).getSQLState()))) { - - final String errorMessage = String.format( - "Failed to delete database %s due to foreign key constraint violation. " - + "Ensure all dependent tables are removed first. Error: %s", - name, exception.getMessage() - ); - throw new DatabasePreconditionFailedException(name, errorMessage, exception); - } +// if (exception.getMessage().contains("violates foreign key constraint") +// || (exception.getCause() instanceof SQLException +// && "23503".equals(((SQLException) exception.getCause()).getSQLState()))) { +// +// final String errorMessage = String.format( +// "Failed to delete database %s due to foreign key constraint violation. " +// + "Ensure all dependent tables are removed first. Error: %s", +// name, exception.getMessage() +// ); +// throw new DatabasePreconditionFailedException(name, errorMessage, exception); +// } throw new InvalidMetaException(name, exception); } catch (Exception exception) { throw new ConnectorException(