apache/seatunnel · error · CatalogException
Failed to drop table %s in catalog %s
Error message
Failed to drop table %s in catalog %s
What it means
TypesenseCatalog.dropTable wraps any exception from typesenseClient.dropCollection() in a CatalogException reporting that the collection (table) could not be dropped. It is raised in dropTable and also propagates via dropDatabase.
Source
Thrown at seatunnel-connectors-v2/connector-typesense/src/main/java/org/apache/seatunnel/connectors/seatunnel/typesense/catalog/TypesenseCatalog.java:175
return;
}
typesenseClient.createCollection(tablePath.getTableName());
}
@Override
public void dropTable(TablePath tablePath, boolean ignoreIfNotExists)
throws TableNotExistException, CatalogException {
checkNotNull(tablePath);
if (!tableExists(tablePath)) {
if (!ignoreIfNotExists) {
throw new TableNotExistException(catalogName, tablePath);
}
return;
}
try {
typesenseClient.dropCollection(tablePath.getTableName());
} catch (Exception ex) {
throw new CatalogException(
String.format(
"Failed to drop table %s in catalog %s",
tablePath.getTableName(), catalogName),
ex);
}
}
@Override
public void createDatabase(TablePath tablePath, boolean ignoreIfExists)
throws DatabaseAlreadyExistException, CatalogException {
createTable(tablePath, null, ignoreIfExists);
}
@Override
public void dropDatabase(TablePath tablePath, boolean ignoreIfNotExists)
throws DatabaseNotExistException, CatalogException {
dropTable(tablePath, ignoreIfNotExists);
}View on GitHub (pinned to cf67b549a7)
Solutions
- Verify the collection exists: GET /collections and compare the exact (case-sensitive) name.
- Check the Typesense API key has delete permissions and matches the target cluster.
- Confirm network reachability to the Typesense node (host/port/protocol) from the client.
- If the table may already be gone, check existence first (tableExists) or tolerate 404 before calling dropTable.
Example fix
// before
catalog.dropTable(TablePath.of("db", "mycollection"));
// after
if (catalog.tableExists(TablePath.of("db", "mycollection"))) {
catalog.dropTable(TablePath.of("db", "mycollection"));
} Defensive patterns
Strategy: try-catch
Validate before calling
// Check collection exists before dropping
boolean exists = catalog.tableExists(TablePath.of("db", "mycollection")); Try / catch
try {
catalog.dropTable(tablePath);
} catch (CatalogException e) {
if (!catalog.tableExists(tablePath)) {
log.warn("Collection already absent; treating drop as no-op");
} else { throw e; }
} Prevention
- Check tableExists before dropTable to tolerate re-runs
- Use an API key with delete permissions and the correct cluster
- Verify Typesense host/port connectivity from the job environment
- Respect Typesense's case-sensitive collection names in config
When it happens
Trigger: typesenseClient.dropCollection(tableName) throws: HTTP 404 (collection doesn't exist), HTTP 401/403 (bad API key), network error to the Typesense node, or the client library failing on the delete request.
Common situations: Dropping a table that was already removed (or never created because a prior job failed); wrong/misconfigured apiKey lacking delete permission; unreachable Typesense host/port in catalog config; case-sensitive collection name mismatches.
Understand the failure class
Background: "API error: {status}" and "HTTP 401/403/404/429/5xx" errors: non-2xx HTTP responses explained — this error's family across 27 libraries.
Related errors
- Failed to drop table %s in catalog %s
- Failed dropping table %s
- Failed to drop table:
- drop table error
- Unsupported action type:
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/8a17068a902c6a7b.
Report an issue: GitHub.