influxdata/influxdb · error · Error
{0}
Error message
{0} What it means
The `Error::NotFound` variant, wrapping a boxed `ServerError<NotFound>` and displayed with no additional prefix (`{0}`). Raised when the requested resource does not exist on the server, mirroring gRPC's NOT_FOUND status; the NotFound detail carries specifics.
Solutions
- Read the wrapped NotFound detail to see exactly which resource was not found.
- Verify the resource name/identifier against the server (list tables/namespaces first).
- Confirm you are pointing at the intended server/environment and connection config.
- Create the resource if it should exist before issuing operations against it.
Example fix
// before
client.table("metricz").await?; // typo, server has "metrics"
// after
let name = "metrics";
if !client.list_tables().await?.iter().any(|t| t == name) {
return Err(format!("table {name} does not exist").into());
}
client.table(name).await?; Defensive patterns
Strategy: validation
Validate before calling
async fn ensure_exists(client: &Client, table: &str) -> Result<(), Error> {
if !client.list_tables().await?.contains(&table.to_string()) {
return Err(Error::from(format!("table {table} missing")));
}
Ok(())
} Type guard
fn is_not_found(e: &Error) -> bool { matches!(e, Error::NotFound(_)) } Try / catch
match result {
Err(Error::NotFound(se)) => { eprintln!("missing resource: {se}"); Err(anyhow!("not found: {se}")) }
other => other,
} Prevention
- Look up resources (list tables/namespaces) before referencing them by name.
- Centralize resource-name constants to avoid typos across codebases.
- Tag environments/connections so you never query the wrong server.
When it happens
Trigger: Any API call referencing a non-existent resource: querying a missing table/database/namespace, fetching an unknown object by identifier, deleting an entity that was never created or already removed.
Common situations: Typos in table or database names, querying against the wrong environment/server, resource deleted by another process or retention policy, casing mismatches in identifiers.
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
- Client specified an invalid argument
- database not found
- Deadline expired before operation could complete
- Operation was attempted past the valid range
- Processing Engine Plugin
AI-assisted analysis of influxdata/influxdb@06200ef96b (2026-09-19).
Data as JSON: /api/errors/6dc06a7e0f05cdb9.
Report an issue: GitHub.
Appendix: source
Thrown at core/influxdb_iox_client/src/client/error.rs:78
}
/// The errors returned by this client
#[derive(Error, Debug)]
#[expect(missing_docs)]
pub enum Error {
#[error("The operation was cancelled: {0}")]
Cancelled(ServerError<()>),
#[error("Unknown server error: {0}")]
Unknown(ServerError<()>),
#[error("Client specified an invalid argument: {0}")]
InvalidArgument(Box<ServerError<FieldViolation>>),
#[error("Deadline expired before operation could complete: {0}")]
DeadlineExceeded(ServerError<()>),
#[error("{0}")]
NotFound(Box<ServerError<NotFound>>),
#[error("Some entity that we attempted to create already exists: {0}")]
AlreadyExists(Box<ServerError<AlreadyExists>>),
#[error("The caller does not have permission to execute the specified operation: {0}")]
PermissionDenied(ServerError<()>),
#[error("Some resource has been exhausted: {0}")]
ResourceExhausted(ServerError<()>),
#[error("The system is not in a state required for the operation's execution: {0}")]
FailedPrecondition(Box<ServerError<PreconditionViolation>>),
#[error("The operation was aborted: {0}")]
Aborted(ServerError<()>),
#[error("Operation was attempted past the valid range: {0}")]View on GitHub (pinned to 06200ef96b)