{"record":{"id":"872a8538bcd00ae2","repo":"apache/iceberg","slug":"unsupported-nessie-content-type","errorCode":null,"errorMessage":"Unsupported Nessie content type ","messagePattern":"Unsupported Nessie content type ","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":400,"severity":"error","filePath":"nessie/src/main/java/org/apache/iceberg/nessie/NessieUtil.java","lineNumber":332,"sourceCode":"        }\n      case KEY_EXISTS:\n        return Optional.of(\n            new AlreadyExistsException(ex, \"%s already exists: %s\", contentType, conflict.key()));\n      default:\n        return Optional.empty();\n    }\n  }\n\n  static String contentTypeString(Content.Type type) {\n    if (type.equals(Content.Type.ICEBERG_VIEW)) {\n      return \"View\";\n    } else if (type.equals(Content.Type.ICEBERG_TABLE)) {\n      return \"Table\";\n    } else if (type.equals(Content.Type.NAMESPACE)) {\n      return \"Namespace\";\n    }\n\n    throw new IllegalArgumentException(\"Unsupported Nessie content type \" + type.name());\n  }\n}\n","sourceCodeStart":314,"sourceCodeEnd":335,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/nessie/src/main/java/org/apache/iceberg/nessie/NessieUtil.java#L314-L335","documentation":"NessieUtil.contentTypeString converts a Nessie Content.Type into the user-facing string ('Table', 'View', 'Namespace'). If the type is none of ICEBERG_VIEW/ICEBERG_TABLE/NAMESPACE, an IllegalArgumentException is thrown. This guards against unknown or newly introduced Nessie content types reaching Iceberg catalog code.","triggerScenarios":"contentType/contentTypeString called with a content type outside the supported set, e.g. Content.Type.DELTA_LAKE or types added in newer Nessie versions; enumerating a Nessie repo whose entries include non-Iceberg content.","commonSituations":"A Nessie repository shared with Delta Lake tooling (Delta content stored under the same repo); mismatched nessie-client / iceberg-nessie versions where new enum values are unknown.","solutions":["Filter or skip non-Iceberg content entries when listing/processing the Nessie repo.","Align iceberg-nessie and nessie-client versions so all content types are known.","Handle unknown types in your own wrapper code before calling Iceberg catalog APIs."],"exampleFix":"// before\nString s = NessieUtil.contentTypeString(content.getType()); // IllegalArgumentException for DELTA\n// after\nif (content.getType() == Content.Type.ICEBERG_TABLE || content.getType() == Content.Type.ICEBERG_VIEW) {\n  String s = NessieUtil.contentTypeString(content.getType());\n}","handlingStrategy":"type-guard","validationCode":"Set<Content.Type> supported = Set.of(Content.Type.ICEBERG_TABLE, Content.Type.ICEBERG_VIEW, Content.Type.NAMESPACE); if (!supported.contains(type)) { skip(entry); }","typeGuard":"boolean isSupportedContentType(Content.Type t) { return t == Content.Type.ICEBERG_TABLE || t == Content.Type.ICEBERG_VIEW || t == Content.Type.NAMESPACE; }","tryCatchPattern":"try { String s = NessieUtil.contentTypeString(type); } catch (IllegalArgumentException e) { /* unknown type: skip or upgrade deps */ }","preventionTips":["Filter entries by supported types before Iceberg processing","Keep nessie-client and iceberg-nessie versions in sync","Use dedicated Nessie repos per content kind"],"tags":["nessie","unsupported-content-type","enum","version-mismatch"],"backgroundTag":"unsupported-enum-value","analyzedSha":"86d9c8fc543e7c56c9f624eb725f76c9baff9570","analyzedAt":"2026-09-12T00:46:39.097Z","contentChangedAt":"2026-09-12T00:46:39.097Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}