influxdata/influxdb · error · CatalogError

the requested resource was not found

Error message

the requested resource was not found: {0}

What it means

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).

Solutions

  1. List existing resources (show databases / list tables) and correct the name
  2. Create the missing resource before referencing it
  3. Check for prior deletion (soft-deleted resources) and undelete if supported
  4. Catch CatalogError::NotFound and surface the included resource name to the user

Example fix

// before
let table = db.table("emeasurements").unwrap(); // typo
// after
let table = db.table("measurements").unwrap_or_else(|| panic!("table measurements not found in {}", db.name()));
Defensive patterns

Strategy: try-catch

Validate before calling

// Rust: list names and validate before lookup
let names: Vec<_> = catalog.list_databases().iter().map(|d| d.name()).collect();
assert!(names.contains(&"mydb".to_string()));

Type guard

fn is_not_found(err: &CatalogError) -> Option<&str> {
    match err { CatalogError::NotFound(name) => Some(name), _ => None }
}

Try / catch

match catalog.db(user_input).await {
    Ok(db) => db,
    Err(CatalogError::NotFound(name)) => {
        return Err(HttpError::bad_request(format!("unknown database: {name}")));
    }
    Err(e) => return Err(e.into()),
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Understand the failure class

Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.

Related errors


AI-assisted analysis of influxdata/influxdb@06200ef96b (2026-09-19). Data as JSON: /api/errors/03977c2edc6068ab. Report an issue: GitHub.

Appendix: source

Thrown at influxdb3_catalog/src/error.rs:53

    channel::SubscriptionError, format::FeatureLevel, format::FormatError,
    log::versions::v4::StorageMode, object_store::ObjectStoreCatalogError,
};

#[derive(Debug, thiserror::Error)]
pub enum CatalogError {
    #[error(transparent)]
    Enterprise(#[from] EnterpriseCatalogError),

    #[error("object store error: {0:?}")]
    ObjectStore(#[from] ObjectStoreCatalogError),

    #[error("catalog format error: {0}")]
    Format(#[from] FormatError),

    #[error("attempted to create a resource that already exists")]
    AlreadyExists,

    #[error("the requested resource was not found: {0}")]
    NotFound(String),

    #[error("attempted to modify resource that was already deleted: {0}")]
    AlreadyDeleted(String),

    /// Request is idempotent: no catalog state would change.
    #[error("no catalog changes to apply: {details}")]
    NoCatalogChange { details: String },

    /// Request is invalid.
    #[error("catalog internal error: {details}")]
    Internal { details: String },

    #[error(
        "persisted catalog checkpoint sequence {checkpoint_sequence} is ahead of live catalog sequence {live_sequence}"
    )]
    BackupCheckpointAhead {
        checkpoint_sequence: u64,

View on GitHub (pinned to 06200ef96b)