{"record":{"id":"74ab94936475b16d","repo":"apache/iceberg","slug":"no-such-table-s-74ab94","errorCode":null,"errorMessage":"No such table '%s'","messagePattern":"No such table '(.+?)'","errorType":"exception","errorClass":"NoSuchTableException","httpStatus":404,"severity":"error","filePath":"nessie/src/main/java/org/apache/iceberg/nessie/NessieTableOperations.java","lineNumber":97,"sourceCode":"    String metadataLocation = null;\n    Reference reference = client.getRef().getReference();\n    try {\n      Content content = client.getApi().getContent().key(key).reference(reference).get().get(key);\n      LOG.debug(\"Content '{}' at '{}': {}\", key, reference, content);\n      if (content == null) {\n        if (currentMetadataLocation() != null) {\n          throw new NoSuchTableException(\"No such table '%s' in '%s'\", key, reference);\n        }\n      } else {\n        this.table =\n            content\n                .unwrap(IcebergTable.class)\n                .orElseThrow(() -> new NessieContentNotFoundException(key, reference.getName()));\n        metadataLocation = table.getMetadataLocation();\n      }\n    } catch (NessieNotFoundException ex) {\n      if (currentMetadataLocation() != null) {\n        throw new NoSuchTableException(ex, \"No such table '%s'\", key);\n      }\n    }\n    refreshFromMetadataLocation(\n        metadataLocation,\n        null,\n        2,\n        location ->\n            NessieUtil.updateTableMetadataWithNessieSpecificProperties(\n                TableMetadataParser.read(fileIO, location),\n                location,\n                table,\n                key.toString(),\n                reference));\n  }\n\n  @Override\n  protected void doCommit(TableMetadata base, TableMetadata metadata) {\n    boolean newTable = base == null;","sourceCodeStart":79,"sourceCodeEnd":115,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/nessie/src/main/java/org/apache/iceberg/nessie/NessieTableOperations.java#L79-L115","documentation":"In NessieTableOperations.doRefresh, if getContent itself throws NessieNotFoundException and the table had already been loaded, the code rethrows it as NoSuchTableException('No such table %s'). This differs from 2226 in that the failure came from the Nessie API call (e.g. the reference or hash was not found during content fetch), not from a null content result.","triggerScenarios":"Content fetch against a ref that is deleted/expired mid-refresh while the table is already loaded; concurrent branch deletion during a read; hash-specific lookups after ref rewind.","commonSituations":"Ephemeral branch removed while a Spark/Flink job is mid-scan; Nessie GC pruning; ref switched underneath a long-running operation.","solutions":["Re-acquire the table through a catalog bound to a live ref.","Verify the ref exists and recreate/re-pin it if deleted (catalog.setRef or fix config).","Catch NoSuchTableException (with cause NessieNotFoundException) in callers and reload rather than retrying blindly.","Avoid deleting branches/refs that active jobs reference."],"exampleFix":"// before\ntry { table.refresh(); } catch (RuntimeException e) { /* may be this NoSuchTableException */ }\n// after\ntry {\n  table.refresh();\n} catch (NoSuchTableException e) {\n  table = catalog.loadTable(id); // re-resolve against a live ref\n}","handlingStrategy":"try-catch","validationCode":"try { nessieApi.content().key(key).reference(ref).get(); } catch (NessieNotFoundException e) { /* ref gone; re-resolve */ }","typeGuard":null,"tryCatchPattern":"try { table.refresh(); } catch (NoSuchTableException e) { if (e.getCause() instanceof NessieNotFoundException) { table = catalog.loadTable(key); } else { throw e; } }","preventionTips":["Re-resolve catalog/table when NessieNotFoundException appears as cause","Avoid deleting refs used by running scans","Monitor Nessie branch lifecycle from job orchestration"],"tags":["nessie","table","not-found","ref-expired","refresh"],"backgroundTag":"entity-not-found","analyzedSha":"86d9c8fc543e7c56c9f624eb725f76c9baff9570","analyzedAt":"2026-09-12T00:46:39.097Z","contentChangedAt":"2026-09-12T00:46:39.097Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}