This is an automated email from the ASF dual-hosted git repository.
emaynard pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/polaris.git
The following commit(s) were added to refs/heads/main by this push:
new 2c1933ca Better error message when sibling resolution fails (#1253)
2c1933ca is described below
commit 2c1933ca98310dc5453d6a3158f3e548b81844ac
Author: Eric Maynard <[email protected]>
AuthorDate: Fri Mar 28 10:44:41 2025 -0700
Better error message when sibling resolution fails (#1253)
* better error
* autolint
* better message
---
.../apache/polaris/service/catalog/iceberg/IcebergCatalog.java | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git
a/service/common/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalog.java
b/service/common/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalog.java
index ef6c9921..a6c71815 100644
---
a/service/common/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalog.java
+++
b/service/common/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalog.java
@@ -1113,9 +1113,12 @@ public class IcebergCatalog extends
BaseMetastoreViewCatalog
new ResolverPath(Arrays.asList(ns.levels()),
PolarisEntityType.NAMESPACE), ns));
ResolverStatus status = resolutionManifest.resolveAll();
if (!status.getStatus().equals(ResolverStatus.StatusEnum.SUCCESS)) {
- throw new IllegalStateException(
- "Unable to resolve sibling entities to validate location - could not
resolve"
- + status.getFailedToResolvedEntityName());
+ String message =
+ "Unable to resolve sibling entities to validate location - " +
status.getStatus();
+ if
(status.getStatus().equals(ResolverStatus.StatusEnum.ENTITY_COULD_NOT_BE_RESOLVED))
{
+ message += ". Could not resolve entity: " +
status.getFailedToResolvedEntityName();
+ }
+ throw new IllegalStateException(message);
}
StorageLocation targetLocation = StorageLocation.of(location);