{"record":{"id":"03977c2edc6068ab","repo":"influxdata/influxdb","slug":"the-requested-resource-was-not-found-0","errorCode":null,"errorMessage":"the requested resource was not found: {0}","messagePattern":"the requested resource was not found: (.+?)","errorType":"validation","errorClass":"CatalogError","httpStatus":404,"severity":"error","filePath":"influxdb3_catalog/src/error.rs","lineNumber":53,"sourceCode":"    channel::SubscriptionError, format::FeatureLevel, format::FormatError,\n    log::versions::v4::StorageMode, object_store::ObjectStoreCatalogError,\n};\n\n#[derive(Debug, thiserror::Error)]\npub enum CatalogError {\n    #[error(transparent)]\n    Enterprise(#[from] EnterpriseCatalogError),\n\n    #[error(\"object store error: {0:?}\")]\n    ObjectStore(#[from] ObjectStoreCatalogError),\n\n    #[error(\"catalog format error: {0}\")]\n    Format(#[from] FormatError),\n\n    #[error(\"attempted to create a resource that already exists\")]\n    AlreadyExists,\n\n    #[error(\"the requested resource was not found: {0}\")]\n    NotFound(String),\n\n    #[error(\"attempted to modify resource that was already deleted: {0}\")]\n    AlreadyDeleted(String),\n\n    /// Request is idempotent: no catalog state would change.\n    #[error(\"no catalog changes to apply: {details}\")]\n    NoCatalogChange { details: String },\n\n    /// Request is invalid.\n    #[error(\"catalog internal error: {details}\")]\n    Internal { details: String },\n\n    #[error(\n        \"persisted catalog checkpoint sequence {checkpoint_sequence} is ahead of live catalog sequence {live_sequence}\"\n    )]\n    BackupCheckpointAhead {\n        checkpoint_sequence: u64,","sourceCodeStart":35,"sourceCodeEnd":71,"githubUrl":"https://github.com/influxdata/influxdb/blob/06200ef96ba82c5f6727e5038a83af8e722c6875/influxdb3_catalog/src/error.rs#L35-L71","documentation":"CatalogError::NotFound(String) is thrown when a requested catalog resource cannot be located by name or identifier. The payload names the missing resource. The library throws it from lookups of databases, tables, columns, tokens, triggers, and caches that do not exist (or have been soft-deleted and are no longer addressable).","triggerScenarios":"GET/querying a database or table name that was never created or already deleted; adding a column referencing a nonexistent table; trigger or cache operations naming a missing table/database; using a stale resource name after a rename/delete.","commonSituations":"Typo'd database/table names in query strings or config; application cache holding names of resources deleted by another operator; environment drift between test and prod.","solutions":["List existing resources (show databases / list tables) and correct the name","Create the missing resource before referencing it","Check for prior deletion (soft-deleted resources) and undelete if supported","Catch CatalogError::NotFound and surface the included resource name to the user"],"exampleFix":"// before\nlet table = db.table(\"emeasurements\").unwrap(); // typo\n// after\nlet table = db.table(\"measurements\").unwrap_or_else(|| panic!(\"table measurements not found in {}\", db.name()));","handlingStrategy":"try-catch","validationCode":"// Rust: list names and validate before lookup\nlet names: Vec<_> = catalog.list_databases().iter().map(|d| d.name()).collect();\nassert!(names.contains(&\"mydb\".to_string()));","typeGuard":"fn is_not_found(err: &CatalogError) -> Option<&str> {\n    match err { CatalogError::NotFound(name) => Some(name), _ => None }\n}","tryCatchPattern":"match catalog.db(user_input).await {\n    Ok(db) => db,\n    Err(CatalogError::NotFound(name)) => {\n        return Err(HttpError::bad_request(format!(\"unknown database: {name}\")));\n    }\n    Err(e) => return Err(e.into()),\n}","preventionTips":["Validate resource names against a live list before API calls","Centralize name constants; avoid free-typed strings","Watch for deletes from other operators/processes","Surface the NotFound payload in user-facing errors"],"tags":["not-found","catalog","lookup"],"backgroundTag":"resource-not-found","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"}