shaofengshi opened a new issue, #9660:
URL: https://github.com/apache/gravitino/issues/9660
### What would you like to be improved?
When I drop a Lance catalog with Lance Rest client, Gravitino Lance Rest
service reports an error:
`Error during example execution: Failed to drop namespace: HTTP 400:
{"error":"Catalog lance_catalog111 is not empty or in
used","code":400,"type":"NonEmptyCatalogException","detail":"com.lancedb.lance.namespace.util.CommonUtil.formatCurrentStackTrace(CommonUtil.java:26)\n\torg.apache.gravitino.lance.common.ops.gravitino.GravitinoLanceNameSpaceOperations.dropCatalog(GravitinoLanceNameSpaceOperations.java:348)\n\torg.apache.gravitino.lance.common.ops.gravitino.GravitinoLanceNameSpaceOperations.dropNamespace(GravitinoLanceNameSpaceOperations.java:182)\n\torg.apache.gravitino.lance.service.rest.LanceNamespaceOperations.dropNamespace(LanceNamespaceOperations.java:133)\n\tjdk.internal.reflect.GeneratedMethodAccessor42.invoke(Unknown
Source)\n\tjava.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)`
It said, the catalog has two situations: not empty, or in-use. While, user
need accurate message to check.
Look at GravitinoLanceNameSpaceOperations.java:343:
` } catch (NonEmptyCatalogException | CatalogInUseException e) {
throw LanceNamespaceException.badRequest(
String.format("Catalog %s is not empty or in used", catalogName),
NonEmptyCatalogException.class.getSimpleName(),
catalogName,
CommonUtil.formatCurrentStackTrace());
}`
The upstream already throws different exceptions, but merged together here,
which caused this issue.
### How should we improve?
I expect to see a better (clear and accurate) error message, not "case a" or
"case b"
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]