{"record":{"id":"a2943d849e4fbea7","repo":"influxdata/influxdb","slug":"resource-type-not-supported-0-permissions","errorCode":null,"errorMessage":"resource type not supported {0}","messagePattern":"resource type not supported (.+?)","errorType":"error_code","errorClass":"ResourceMappingError","httpStatus":null,"severity":"error","filePath":"influxdb3_authz/src/permissions.rs","lineNumber":32,"sourceCode":"pub const AUTHZ_TOKEN_RESOURCE_TYPE: &str = \"token\";\n\npub const AUTHZ_CREATE_DB_ACTION: &str = \"create\";\npub const AUTHZ_DESCRIBE_DB_ACTION: &str = \"describe\";\npub const AUTHZ_WRITE_DB_ACTION: &str = \"write\";\npub const AUTHZ_READ_DB_ACTION: &str = \"read\";\n\npub const AUTHZ_DELETE_ROW_ACTION: &str = \"delete\";\n\npub const AUTHZ_CREATE_CRUD_ACTION: &str = \"create\";\npub const AUTHZ_READ_CRUD_ACTION: &str = \"read\";\npub const AUTHZ_UPDATE_CRUD_ACTION: &str = \"update\";\npub const AUTHZ_DELETE_CRUD_ACTION: &str = \"delete\";\n\npub const AUTHZ_WILDCARD: &str = \"*\";\n\n#[derive(Debug, Error)]\npub enum ResourceMappingError {\n    #[error(\"resource type not supported {0}\")]\n    ResourceTypeNotSupported(String),\n    #[error(\"invalid resource name {0}\")]\n    InvalidResourceName(String),\n    #[error(\"mixed wildcard (*) and resource name\")]\n    MixedWildcardAndRegularResourceName,\n    #[error(\"missing resource name {0}\")]\n    MissingResourceName(String),\n    #[error(\"action not supported, {0}\")]\n    ActionNotSupported(String),\n    #[error(\"missing resource id {0}\")]\n    MissingResourceId(String),\n}\n\npub trait ResourceNameToIdProvider {\n    fn resource_name_to_id(\n        &self,\n        resource_type: ResourceType,\n        names: &[String],","sourceCodeStart":14,"sourceCodeEnd":50,"githubUrl":"https://github.com/influxdata/influxdb/blob/06200ef96ba82c5f6727e5038a83af8e722c6875/influxdb3_authz/src/permissions.rs#L14-L50","documentation":"ResourceMappingError::ResourceTypeNotSupported is thrown when a resource type string passed to the permission resource-mapping layer cannot be mapped to a known resource type. The authz crate maintains a fixed set of recognized resource types; any other string is rejected. It indicates the caller supplied a resource type outside the supported vocabulary.","triggerScenarios":"Calling permission/resource mapping APIs (e.g. converting a resource name/type string into a resource identifier) with a resource-type string that is not one of the recognized influxdb3 resource types.","commonSituations":"Typo in a resource type in token permission definitions; using a resource type from an older or newer InfluxDB 3 version that the current crate version does not know; hand-editing serialized permission JSON.","solutions":["Check the resource type string against the ResourceType definitions in influxdb3_authz/src/permissions.rs and correct the typo.","Upgrade or align the influxdb3_authz crate version so both sides of the permission data agree on supported resource types.","If a genuinely new resource type is needed, extend the ResourceType enum and its FromStr/mapping implementation."],"exampleFix":"// before\nlet rt = \"buckets\"; // unsupported\n// after\nlet rt = \"databases\"; // a supported ResourceType string","handlingStrategy":"validation","validationCode":"const SUPPORTED: &[&str] = &[\"databases\", \"tables\", \"tokens\", \"system\"];\nfn is_supported_resource_type(rt: &str) -> bool { SUPPORTED.contains(&rt) || rt == \"*\" }","typeGuard":null,"tryCatchPattern":"match map_resource_type(rt) {\n    Ok(id) => id,\n    Err(ResourceMappingError::ResourceTypeNotSupported(s)) => bail!(\"unsupported resource type: {s}\"),\n    Err(e) => return Err(e.into()),\n}","preventionTips":["Keep a single shared constant list of supported resource types used by both config and code","Validate permission definitions at load time, not at request time","Pin matching versions of client tooling and influxdb3_authz"],"tags":["authz","permissions","resource-mapping"],"backgroundTag":"unsupported-enum-value","analyzedSha":"06200ef96ba82c5f6727e5038a83af8e722c6875","analyzedAt":"2026-09-19T12:55:30.003Z","contentChangedAt":"2026-09-19T12:55:30.003Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}