{"record":{"id":"63ef233451e1554b","repo":"risingwavelabs/risingwave","slug":"url-parse-error-for-s3-deltalake-location-wrapped","errorCode":null,"errorMessage":"Url parse error for S3 deltalake location (wrapped error)","messagePattern":"Url parse error for S3 deltalake location \\(wrapped error\\)","errorType":"exception","errorClass":"SinkError::DeltaLake","httpStatus":null,"severity":"error","filePath":"src/connector/src/sink/deltalake.rs","lineNumber":103,"sourceCode":"        AwsAuthProps::enforce_one(prop)?;\n        if Self::ENFORCE_SECRET_PROPERTIES.contains(prop) {\n            return Err(EnforceSecretError {\n                key: prop.to_owned(),\n            }\n            .into());\n        }\n\n        Ok(())\n    }\n}\n\nimpl DeltaLakeCommon {\n    pub async fn create_deltalake_client(&self) -> Result<DeltaTable> {\n        let table = match Self::get_table_url(&self.location)? {\n            DeltaTableUrl::S3(s3_path) => {\n                let storage_options = self.build_delta_lake_config_for_aws().await?;\n                deltalake::aws::register_handlers(None);\n                let url = Url::parse(&s3_path).map_err(|e| SinkError::DeltaLake(anyhow!(e)))?;\n                deltalake::open_table_with_storage_options(url, storage_options).await?\n            }\n            DeltaTableUrl::Local(local_path) => {\n                let url = Url::parse(&format!(\"file://{}\", local_path))\n                    .map_err(|e| SinkError::DeltaLake(anyhow!(e)))?;\n                deltalake::open_table(url).await?\n            }\n            DeltaTableUrl::Gcs(gcs_path) => {\n                let mut storage_options = HashMap::new();\n                storage_options.insert(\n                    GCS_SERVICE_ACCOUNT.to_owned(),\n                    self.gcs_service_account.clone().ok_or_else(|| {\n                        SinkError::Config(anyhow!(\n                            \"gcs.service.account is required with Google Cloud Storage (GCS)\"\n                        ))\n                    })?,\n                );\n                deltalake::gcp::register_handlers(None);","sourceCodeStart":85,"sourceCodeEnd":121,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/sink/deltalake.rs#L85-L121","documentation":"When creating the DeltaLake client for an S3-located table, the connector parses the s3 path into a `Url` via Url::parse. Any parse failure (invalid characters, missing scheme, malformed host) is wrapped into SinkError::DeltaLake, surfacing the underlying url crate error message.","triggerScenarios":"create_deltalake_client with a location classified as DeltaTableUrl::S3 whose path fails Url::parse — e.g. 's3://bad host/table', spaces, or control characters in the location string.","commonSituations":"Typo or extra characters in the sink's deltalake location option; copying a location with trailing spaces/newlines from docs or a config file; special characters in bucket names.","solutions":["Fix the location option so it is a well-formed URL like s3://bucket/path.","Trim whitespace/newlines around the configured location value.","URL-encode or remove invalid characters from bucket/path names."],"exampleFix":"// before\nCREATE SINK s INTO DELTALAKE LOCATION = 's3://my bucket/table';\n// after\nCREATE SINK s INTO DELTALAKE LOCATION = 's3://my-bucket/table';","handlingStrategy":"validation","validationCode":"let loc = location.trim();\nif !loc.starts_with(\"s3://\") && !loc.starts_with(\"s3a://\") {\n    return Err(\"S3 deltalake location must start with s3:// or s3a://\");\n}\nUrl::parse(loc).map_err(|e| format!(\"invalid location URL: {e}\"))?;","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Trim whitespace from location values before configuring sinks.","Validate bucket/path names contain only URL-safe characters."],"tags":["rust","deltalake","s3","url"],"backgroundTag":"invalid-url-format","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}