{"record":{"id":"670ca13429bbf28f","repo":"Hmbown/CodeWhale","slug":"is-not-a-valid-provider-id-ids-are-1-64-characters-of","errorCode":null,"errorMessage":"`{}` is not a valid provider id. Ids are 1-64 characters of lowercase letters, digits, and `-`. Run `codewhale account keys list` to see the account's providers","messagePattern":"`(.+?)` is not a valid provider id\\. Ids are 1-64 characters of lowercase letters, digits, and `-`\\. Run `codewhale account keys list` to see the account's providers","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/cli/src/cloud.rs","lineNumber":201,"sourceCode":"            .or_else(|| ProviderKind::parse_config_identity(&self.id))\n    }\n}\n\n/// Accept a provider id conservatively before it is ever put in a URL path.\n///\n/// `^[a-z0-9][a-z0-9-]{0,63}$`. The catalog is remote data, so this guards\n/// both directions: a hostile catalog cannot smuggle a path segment, and a\n/// mistyped argument fails locally instead of as a confusing 404.\nfn validate_provider_id(value: &str) -> Result<String> {\n    let trimmed = value.trim();\n    let bytes = trimmed.as_bytes();\n    let well_formed = (1..=64).contains(&bytes.len())\n        && (bytes[0].is_ascii_lowercase() || bytes[0].is_ascii_digit())\n        && bytes\n            .iter()\n            .all(|byte| byte.is_ascii_lowercase() || byte.is_ascii_digit() || *byte == b'-');\n    if !well_formed {\n        bail!(\n            \"`{}` is not a valid provider id. Ids are 1-64 characters of lowercase letters, digits, and `-`. Run `codewhale account keys list` to see the account's providers\",\n            printable(trimmed)\n        );\n    }\n    Ok(trimmed.to_string())\n}\n\n#[derive(Clone, Copy, PartialEq, Eq)]\nenum HttpMethod {\n    Get,\n    Post,\n    Put,\n    Delete,\n}\n\npub(crate) struct CloudRequest {\n    method: HttpMethod,\n    path: String,","sourceCodeStart":183,"sourceCodeEnd":219,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/cli/src/cloud.rs#L183-L219","documentation":"validate_provider_id checks that a cloud provider id is 1-64 characters of lowercase letters, digits, and hyphens before it can be safely embedded in a URL path. Any other identifier format is rejected with this message listing the account's providers via `codewhale account keys list`.","triggerScenarios":"Passing an invalid provider string to `codewhale` cloud subcommands that take a provider argument (e.g. run_with, key management) — empty string, uppercase, spaces, underscore, slashes (path traversal), or over 64 characters.","commonSituations":"Typo or hand-copied provider id with whitespace; using a display name instead of the id; shell variable containing a URL or path; old scripts written before id normalization.","solutions":["Run `codewhale account keys list` and copy the exact provider id.","Trim whitespace and replace underscores/spaces with hyphens; lowercase the value.","If the provider id comes from config, fix the config value to match the validated format."],"exampleFix":"// before\ncodewhale cloud run_with \"My_Provider\"\n// after\ncodewhale cloud run_with \"my-provider\"","handlingStrategy":"validation","validationCode":"fn is_valid_provider_id(id: &str) -> bool {\n    let b = id.as_bytes();\n    (1..=64).contains(&b.len())\n        && b.iter().all(|c| c.is_ascii_lowercase() || c.is_ascii_digit() || *c == b'-')\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Copy provider ids from `codewhale account keys list`, never from display names.","Trim shell variables before passing them as provider arguments.","Never embed slashes, underscores, or uppercase in provider ids."],"tags":["cli","validation","provider","identifier"],"backgroundTag":"invalid-identifier-format","analyzedSha":"73e0f67d83c59909b571efdfc88c4bc28c309cb1","analyzedAt":"2026-09-22T01:30:00.501Z","contentChangedAt":"2026-09-22T01:30:00.501Z","schemaVersion":2},"datasetVersion":"2026-09-22T11:17:16.035Z"}