{"record":{"id":"24b2c568e25d48e3","repo":"dbt-labs/dbt-core","slug":"api-endpoint-is-missing-a-trailing-which-db","errorCode":null,"errorMessage":"'api_endpoint' is missing a trailing '/', which dbt appends automatically. We suggest setting it to '{endpoint}/' instead.","messagePattern":"'api_endpoint' is missing a trailing '/', which dbt appends automatically\\. We suggest setting it to '(.+?)/' instead\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"crates/dbt-auth/src/bigquery/mod.rs","lineNumber":169,"sourceCode":"        AuthError::config(format!(\n            \"'api_endpoint' must start with 'http://' or 'https://': {endpoint:?}\"\n        ))\n    })?;\n\n    if url.scheme() != \"http\" && url.scheme() != \"https\" {\n        return Err(AuthError::config(format!(\n            \"'api_endpoint' must start with 'http://' or 'https://': {endpoint:?}\"\n        )));\n    }\n\n    if url.path() != \"/\" || url.query().is_some() || url.fragment().is_some() {\n        return Err(AuthError::config(format!(\n            \"'api_endpoint' must be a bare host (with optional port), e.g. 'https://your-proxy.example.com/': {endpoint:?}\"\n        )));\n    }\n\n    if !endpoint.ends_with('/') {\n        warning_printer.warn(&format!(\n            \"'api_endpoint' is missing a trailing '/', which dbt appends automatically. We suggest setting it to '{endpoint}/' instead.\"\n        ));\n        Ok(Cow::Owned(format!(\"{endpoint}/\")))\n    } else {\n        Ok(Cow::Borrowed(endpoint))\n    }\n}\n\nfn parse_auth<'a>(\n    config: &'a AdapterConfig,\n    _warning_printer: &dyn AuthWarningPrinter,\n) -> Result<BigqueryAuthIR<'a>, AuthError> {\n    let method = config\n        .get_str(\"method\")\n        .ok_or_else(|| AuthError::config(\"Missing required 'method' field in BigQuery config\"))?;\n\n    match method {\n        \"oauth\" => Ok(BigqueryAuthIR::Oauth),","sourceCodeStart":151,"sourceCodeEnd":187,"githubUrl":"https://github.com/dbt-labs/dbt-core/blob/0267ce9170576975b76b64ce856b2e5848e96617/crates/dbt-auth/src/bigquery/mod.rs#L151-L187","documentation":"This is a non-fatal warning emitted while validating the BigQuery `api_endpoint` connection setting. The endpoint URL does not end with a trailing '/', and dbt appends one automatically when building request URLs. The validator normalizes the value to '{endpoint}/' and prints a suggestion so the user can make the configuration explicit; the connection still proceeds with the corrected value.","triggerScenarios":"Setting profiles.yml `api_endpoint` for a BigQuery connection (e.g. 'https://your-proxy.example.com') without a trailing slash, then running any dbt command; validate_api_endpoint() (called from apply_connection_args) detects the missing '/' and warns while returning the normalized URL.","commonSituations":"Configuring a custom BigQuery API proxy or regional endpoint and copying the bare host from browser address bars or docs, which typically omit the trailing slash; also common when the endpoint comes from an environment variable assembled without a trailing slash.","solutions":["Add a trailing slash to api_endpoint in profiles.yml: api_endpoint: 'https://your-proxy.example.com/'.","If the value comes from an environment variable, ensure the exported value ends with '/'.","No action strictly required — dbt appends the slash automatically — but fix the config to silence the warning."],"exampleFix":"# before (profiles.yml)\napi_endpoint: 'https://your-proxy.example.com'\n# after\napi_endpoint: 'https://your-proxy.example.com/'","handlingStrategy":"validation","validationCode":"// Python pre-check on profiles.yml values before invoking dbt\ndef check_api_endpoint(endpoint: str) -> str:\n    if not endpoint.endswith('/'):\n        print(f\"warning: 'api_endpoint' is missing a trailing '/'; dbt appends it automatically. Use '{endpoint}/'.\")\n        return endpoint + '/'\n    return endpoint","typeGuard":"def is_normalized_endpoint(endpoint: str) -> bool:\n    return endpoint.startswith('https://') and endpoint.endswith('/')","tryCatchPattern":"// This is a warning, not an exception; dbt normalizes and continues.\n// To surface it explicitly when invoking dbt programmatically, scan stderr:\nif \"missing a trailing '/'\" in stderr_text:\n    print(\"api_endpoint should end with '/' — update profiles.yml to silence this warning.\")","preventionTips":["Always write BigQuery api_endpoint values with a trailing slash in profiles.yml.","Validate endpoint env vars at deploy time (assert endswith('/')).","Prefer copying endpoint URLs from service documentation's canonical form rather than browser address bars.","Include api_endpoint in a pre-commit lint of profiles.yml in CI."],"tags":["bigquery","configuration","url-format"],"backgroundTag":"invalid-url-format","analyzedSha":"0267ce9170576975b76b64ce856b2e5848e96617","analyzedAt":"2026-09-07T21:53:39.732Z","contentChangedAt":"2026-09-07T21:53:39.732Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}