{"record":{"id":"c94fa35c31641f11","repo":"influxdata/influxdb","slug":"failed-to-parse-the-value-provided-value-and-encountered-the","errorCode":null,"errorMessage":"Failed to parse the value; provided {value:?} and encountered the following error: {err}","messagePattern":"Failed to parse the value; provided (.+?) and encountered the following error: (.+?)","errorType":"validation","errorClass":"GrpcTimeoutParseError","httpStatus":null,"severity":"error","filePath":"core/data_types/src/lib.rs","lineNumber":2427,"sourceCode":"/// A duration pulled from the `grpc-timeout` header, newtype'd so we don't confuse durations at\n/// some points and so that we can impl FromStr\n#[derive(Debug, Copy, Clone)]\npub struct GrpcTimeoutDuration(pub Duration);\n\n/// An error that can arise from trying to parse the `grpc-timeout` duration\n#[derive(thiserror::Error, Debug)]\npub enum GrpcTimeoutParseError {\n    /// The header was empty\n    #[error(\"The provided value was empty\")]\n    EmptyValue,\n    /// There were too many digits in the header before the suffix - the grpc spec specifies that\n    /// there must be no more than 8.\n    #[error(\n        \"The provided value contained too many digits in the prefix; expected a maximum of 8 but got {0}\"\n    )]\n    TooManyDigits(usize),\n    /// The value (number before the suffix) couldn't be parsed to a u64\n    #[error(\n        \"Failed to parse the value; provided {value:?} and encountered the following error: {err}\"\n    )]\n    UnparseableValue {\n        /// The value which we couldn't parse\n        value: String,\n        /// The error arising from the failure to parse\n        err: <u64 as FromStr>::Err,\n    },\n    /// The suffix which specifies the time base (e.g. seconds, hours, milliseconds, etc)\n    #[error(\"The value contained an unrecognized suffic of {0:?}\")]\n    UnrecognizedSuffix(String),\n}\n\nimpl FromStr for GrpcTimeoutDuration {\n    type Err = GrpcTimeoutParseError;\n    fn from_str(val: &str) -> Result<Self, Self::Err> {\n        if val.is_empty() {\n            return Err(GrpcTimeoutParseError::EmptyValue);","sourceCodeStart":2409,"sourceCodeEnd":2445,"githubUrl":"https://github.com/influxdata/influxdb/blob/06200ef96ba82c5f6727e5038a83af8e722c6875/core/data_types/src/lib.rs#L2409-L2445","documentation":"GrpcTimeoutParseError::UnparseableValue, fired when the numeric part of the `grpc-timeout` header cannot be parsed as a u64; the header carried a malformed or overflowing number before the unit suffix.","triggerScenarios":"Thrown at core/data_types/src/lib.rs:2427 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure the value before the suffix is a plain non-negative integer that fits in u64","Strip whitespace or stray characters from the header value","Log the captured `value` field to identify the malformed header source"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}