{"record":{"id":"f59b0006dd55a5f5","repo":"risingwavelabs/risingwave","slug":"icebergerror-from-e","errorCode":null,"errorMessage":"IcebergError::from(e)","messagePattern":"IcebergError::from\\(e\\)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/connector/src/connector_common/iceberg/mod.rs","lineNumber":446,"sourceCode":"                    catalog_name: self.common.catalog_name(),\n                    catalog_impl,\n                    java_catalog_props,\n                })\n            }\n        }\n    }\n\n    pub async fn create_catalog(&self) -> ConnectorResult<Arc<dyn Catalog>> {\n        match self.build_plan()? {\n            CatalogBuildPlan::Storage(config) => {\n                let catalog = storage_catalog::StorageCatalog::new(config)?;\n                Ok(Arc::new(catalog))\n            }\n            CatalogBuildPlan::NativeRest(iceberg_configs) => {\n                let catalog = iceberg_catalog_rest::RestCatalogBuilder::default()\n                    .load(\"rest\", iceberg_configs)\n                    .await\n                    .map_err(|e| anyhow!(IcebergError::from(e)))?;\n                Ok(Arc::new(catalog))\n            }\n            CatalogBuildPlan::NativeGlue(iceberg_configs) => {\n                let catalog = iceberg_catalog_glue::GlueCatalogBuilder::default()\n                    .load(\"glue\", iceberg_configs)\n                    .await\n                    .map_err(|e| anyhow!(IcebergError::from(e)))?;\n                Ok(Arc::new(catalog))\n            }\n            CatalogBuildPlan::Jni {\n                file_io_props,\n                catalog_name,\n                catalog_impl,\n                java_catalog_props,\n            } => {\n                jni_catalog::JniCatalog::build_catalog(\n                    file_io_props,\n                    catalog_name,","sourceCodeStart":428,"sourceCodeEnd":464,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/connector_common/iceberg/mod.rs#L428-L464","documentation":"`create_catalog` wraps a failure from the native REST catalog builder (`iceberg_catalog_rest::RestCatalogBuilder::load`) — typically network/config errors establishing the REST catalog client — into `IcebergError` and then `anyhow!`. The original REST client error is preserved as the source.","triggerScenarios":"Calling `create_catalog` (via `load_table`) when `CatalogBuildPlan::NativeRest` is selected and the REST catalog endpoint is unreachable, returns an error, TLS fails, or required rest props (uri, credentials) are wrong.","commonSituations":"Wrong `catalog.uri`, REST server down or behind a proxy, expired OAuth2 credentials, self-signed certs, DNS failure in container networks.","solutions":["Inspect the wrapped `IcebergError`/underlying reqwest error for the root cause (connection refused, DNS, TLS).","Verify `catalog.uri` is reachable from the RisingWave node (`curl <uri>/v1/config`).","Check REST catalog credentials/headers (see the catalog.header format) and OAuth settings."],"exampleFix":"// before\nwith ( catalog.type = 'rest', catalog.uri = 'http://localhost:8181' ) -- server not started\n// after\n# start the REST catalog first, then\nwith ( catalog.type = 'rest', catalog.uri = 'http://rest:8181' )","handlingStrategy":"try-catch","validationCode":"const res = await fetch(restUri + '/v1/config'); // fail fast if REST catalog is unreachable\nif (!res.ok) throw new Error(`REST catalog unreachable: ${res.status}`);","typeGuard":null,"tryCatchPattern":"match load_table(...).await {\n    Err(e) if e.to_string().contains(\"RestCatalog\") => {\n        tracing::error!(\"REST catalog setup failed: {e:#}\");\n        // check uri/credentials then retry\n    }\n    other => other?,\n}","preventionTips":["Health-check the REST catalog URI from the RisingWave host before creating tables.","Keep OAuth tokens/credentials refreshed and test TLS trust store setup.","Log the full anyhow chain ({e:#}) to see the underlying reqwest error."],"tags":["iceberg","rest-catalog","network"],"backgroundTag":"api-request-failed","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}