{"record":{"id":"2b0bf16270912631","repo":"influxdata/influxdb","slug":"a-supported-service-limit-value-is-required","errorCode":null,"errorMessage":"a supported service limit value is required","messagePattern":"a supported service limit value is required","errorType":"validation","errorClass":"ServiceLimitError","httpStatus":null,"severity":"error","filePath":"core/data_types/src/service_limits.rs","lineNumber":227,"sourceCode":"/// gRPC request supports, so match that encoding on the Rust side.\n#[derive(Debug, Clone, Copy, PartialEq, Eq)]\npub enum ServiceLimitUpdate {\n    /// Requesting an update to the maximum number of tables allowed in this namespace\n    MaxTables(MaxTables),\n    /// Requesting an update to the maximum number of columns allowed in each table in this\n    /// namespace\n    MaxColumnsPerTable(MaxColumnsPerTable),\n}\n\n/// Errors converting from raw values to the service limits\n#[derive(Error, Debug, Clone, Copy)]\npub enum ServiceLimitError {\n    /// A negative or 0 value was specified; those aren't allowed\n    #[error(\"service limit values must be greater than 0\")]\n    MustBeGreaterThanZero,\n\n    /// No value was provided so we can't update anything\n    #[error(\"a supported service limit value is required\")]\n    NoValueSpecified,\n\n    /// Limits are stored as `i32` in the database and transferred as i32 over protobuf, so even\n    /// though they are stored as `usize` in Rust, the `usize` value must be less than `i32::MAX`.\n    #[error(\"service limit values must fit in a 32-bit signed integer (`i32`)\")]\n    MustFitInI32,\n\n    /// Per-table column limits are restricted\n    #[error(\n        \"per-table column limits are restricted to a maximum value of {0} for system performance purposes\"\n    )]\n    ColumnLimitTooLarge(MaxColumnsPerTable),\n}\n\nimpl ServiceLimitUpdate {\n    /// Constructs a [`ServiceLimitUpdate`] from the provided `limit_update`,\n    /// performing validation and applying `column_limit_upper_bound` to the\n    /// per-table column limit.","sourceCodeStart":209,"sourceCodeEnd":245,"githubUrl":"https://github.com/influxdata/influxdb/blob/06200ef96ba82c5f6727e5038a83af8e722c6875/core/data_types/src/service_limits.rs#L209-L245","documentation":"`ServiceLimitError::NoValueSpecified` is raised when an update to a service limit is attempted but no value was supplied at all. Since there is nothing to convert or apply, the library cannot perform a meaningful update and rejects the request instead of silently no-oping.","triggerScenarios":"Constructing a `ServiceLimitUpdate`/conversion from a raw representation whose value field is absent (e.g. a protobuf `i32` limit field missing, or `None`/unset option passed to a limit-update conversion) in `service_limits.rs`.","commonSituations":"API clients sending partial limit-update requests where the intended field was accidentally omitted; protobuf messages decoded with unset optional limit fields; config parsing where a limit key is missing and the default is 'no value'.","solutions":["Provide an explicit, supported limit value for the field you intend to update.","If no update was intended, skip building the update entirely rather than constructing an empty one.","Validate incoming request payloads server-side so missing limit fields are rejected before reaching the conversion.","Check protobuf/config schemas to ensure the limit field is actually being populated."],"exampleFix":"// before\nlet update = ServiceLimitUpdate::try_from(raw // value unset\n)\n// after\nmatch raw.value {\n    Some(v) => ServiceLimitUpdate::try_from(v)?,\n    None => return Ok(()), // skip: nothing to update\n}","handlingStrategy":"validation","validationCode":"let value = raw.value.ok_or(\"a supported service limit value is required\")?;","typeGuard":null,"tryCatchPattern":"match raw.value {\n    Some(v) => apply(ServiceLimitUpdate::try_from(v)?),\n    None => return Err(ServiceLimitError::NoValueSpecified.into()),\n}","preventionTips":["Ensure request schemas mark limit fields as required or explicitly optional-with-skip semantics","Check protobuf field presence (Option) before constructing updates","Fail fast at the API boundary when a limit field is missing"],"tags":["rust","service-limits","missing-value"],"backgroundTag":"missing-required-argument","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"}