influxdata/influxdb · error · SingleTenantExtractError::NoBucketSpecified
missing bucket value
Error message
missing bucket value
What it means
SingleTenantExtractError::NoBucketSpecified is raised while parsing a v2 write request in single-tenant mode. In that mode the 'bucket' path/query segment is expected to name the namespace, and an empty string means no bucket was supplied. The library cannot derive a NamespaceName, so it rejects the request.
Solutions
- Set the bucket parameter to the target namespace on the v2 write request URL.
- Verify the client/SDK configuration actually passes the bucket value rather than an empty default.
- If using v1-style writes, call the v1 endpoint where db is supplied instead of bucket.
- Handle SingleTenantExtractError::NoBucketSpecified in the request handler and return a 400 with guidance.
Example fix
// before
let url = format!("http://host/api/v2/write?org=myorg&bucket=");
// after
let url = format!("http://host/api/v2/write?org=myorg&bucket=mybucket"); Defensive patterns
Strategy: validation
Validate before calling
if bucket.is_empty() {
return Err("v2 write requires a non-empty bucket parameter");
} Try / catch
match res {
Err(SingleTenantExtractError::NoBucketSpecified) => /* return 400 'bucket is required' */,
Err(e) => /* map other errors */,
Ok(v) => v,
} Prevention
- Always include bucket in v2 write URLs and client configs.
- Assert configured bucket is non-empty at client startup.
- Use SDK builders that enforce required v2 params.
When it happens
Trigger: Sending an HTTP write request to the v2 (/api/v2/write) endpoint in single-tenant mode with an empty bucket value (e.g. POST /write?org=x&bucket= or missing bucket entirely).
Common situations: Clients configured for v2 writes without setting the bucket field; ported scripts from v1 where only db/rp were used; reverse proxies stripping the bucket query parameter; SDKs where the bucket config value defaults to "".
Understand the failure class
Background: "must not be empty", "cannot be empty" — required-field validation errors across open-source libraries — this error's family across 41 libraries.
Related errors
- db name did not start with a number or letter
- error reading field from body
- failed to deserialize db/rp/precision in request
- failed to deserialize org/bucket/precision in request
- invalid character in database or rp name: must be ASCII…
AI-assisted analysis of influxdata/influxdb@06200ef96b (2026-09-19).
Data as JSON: /api/errors/8a11267052b2d1b7.
Report an issue: GitHub.
Appendix: source
Thrown at core/iox_http/src/write/single_tenant/mod.rs:33
use auth::authorize;
use authz::{self, Authorizer};
use data_types::{NamespaceName, NamespaceNameError};
use iox_http_util::Request;
use thiserror::Error;
use crate::write::v1::V1_NAMESPACE_RP_SEPARATOR;
use super::{
WriteParams, WriteParseError, WriteRequestUnifier,
v1::{RetentionPolicy, V1WriteParseError, WriteParamsV1},
v2::{V2WriteParseError, WriteParamsV2},
};
/// Request parsing errors when operating in "single tenant" mode.
#[derive(Debug, Error)]
pub enum SingleTenantExtractError {
/// v2 bucket is an empty string.
#[error("missing bucket value")]
NoBucketSpecified,
/// The namespace (or "db" for V1) is not valid.
#[error(transparent)]
InvalidNamespace(#[from] NamespaceNameError),
/// A [`WriteParamsV1`] failed to be parsed from the HTTP request.
#[error(transparent)]
ParseV1Request(#[from] V1WriteParseError),
/// A [`WriteParamsV2`] failed to be parsed from the HTTP request.
#[error(transparent)]
ParseV2Request(#[from] V2WriteParseError),
/// An error occurred verifying the authorization token.
#[error(transparent)]
Authorizer(authz::Error),
}View on GitHub (pinned to 06200ef96b)