{"record":{"id":"c054d3c4451dd914","repo":"influxdata/influxdb","slug":"invalid-flatbuffer-0","errorCode":null,"errorMessage":"Invalid Flatbuffer: `{0}`","messagePattern":"Invalid Flatbuffer: `(.+?)`","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"core/influxdb_iox_client/src/client/flight/mod.rs","lineNumber":50,"sourceCode":"\n/// Error responses when querying an IOx namespace using the IOx Flight API.\n#[derive(Debug, Error)]\npub enum Error {\n    /// There were no FlightData messages returned when we expected to get one\n    /// containing a Schema.\n    #[error(\"no FlightData containing a Schema returned\")]\n    NoSchema,\n\n    /// An error involving an Arrow operation occurred.\n    #[error(transparent)]\n    ArrowError(#[from] arrow::error::ArrowError),\n\n    /// An error involving an Arrow Flight operation occurred.\n    #[error(transparent)]\n    ArrowFlightError(#[from] FlightError),\n\n    /// The data contained invalid Flatbuffers.\n    #[error(\"Invalid Flatbuffer: `{0}`\")]\n    InvalidFlatbuffer(String),\n\n    /// The message header said it was a dictionary batch, but interpreting the\n    /// message as a dictionary batch returned `None`. Indicates malformed\n    /// Flight data from the server.\n    #[error(\"Message with header of type dictionary batch could not return a dictionary batch\")]\n    CouldNotGetDictionaryBatch,\n\n    /// Arrow Flight handshake failed.\n    #[error(\"Handshake failed: {0}\")]\n    HandshakeFailed(String),\n\n    /// Serializing the protobuf structs into bytes failed.\n    #[error(transparent)]\n    Serialization(#[from] prost::EncodeError),\n\n    /// Deserializing the protobuf structs from bytes failed.\n    #[error(transparent)]","sourceCodeStart":32,"sourceCodeEnd":68,"githubUrl":"https://github.com/influxdata/influxdb/blob/06200ef96ba82c5f6727e5038a83af8e722c6875/core/influxdb_iox_client/src/client/flight/mod.rs#L32-L68","documentation":"InvalidFlatbuffer(String) is a variant of the Flight query Error enum in core/influxdb_iox_client/src/client/flight/mod.rs, raised when data received over Arrow Flight contains invalid Flatbuffers (the binary format underlying Arrow IPC metadata). The String carries the underlying flatbuffers validation error message. It means the wire bytes could not be parsed as valid Arrow IPC metadata, i.e. the stream is corrupt or not Arrow data at all.","triggerScenarios":"A Flight message whose metadata flatbuffer fails validation during decode of FlightData; receiving non-Arrow bytes (e.g. an HTML error page or JSON error body) on the Flight stream; byte corruption in transit or a server writing malformed IPC.","commonSituations":"Proxy/gateway returning an HTTP error page on the Flight port; version skew where the server emits IPC metadata the client cannot parse; truncated streams from network middleware buffering binary data incorrectly.","solutions":["Capture the wrapped flatbuffers error string to identify which message/metadata failed.","Check whether an intermediary (proxy, gateway) is intercepting the Flight port and returning non-Arrow payloads.","Align client (arrow-rs / influxdb_iox_client) and server versions to avoid IPC format incompatibilities.","Retry the request; if corruption is persistent, inspect the server's IPC writing path and network path for damage."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// preflight: ensure the endpoint speaks gRPC/Flight, not HTTP error pages\nclient.health().await.expect(\"endpoint must be a Flight service\");","typeGuard":"fn is_invalid_flatbuffer(e: &flight::Error) -> Option<&str> {\n    match e {\n        flight::Error::InvalidFlatbuffer(msg) => Some(msg),\n        _ => None,\n    }\n}","tryCatchPattern":"match res {\n    Err(flight::Error::InvalidFlatbuffer(msg)) if attempt < 2 => {\n        log::warn!(\"corrupt Flight payload ({msg}); retrying\");\n        retry()\n    }\n    Err(flight::Error::InvalidFlatbuffer(msg)) => {\n        // persistent corruption: check proxies/version skew\n        Err(anyhow!(\"persistent flatbuffer corruption: {msg}\"))\n    }\n    other => other.map_err(Into::into),\n}","preventionTips":["Never expose the Flight port through HTML-error-producing proxies","Keep arrow-rs and server IPC formats version-matched","Log the flatbuffer error string to diagnose which metadata failed"],"tags":["arrow","flight","flatbuffers","rust","influxdb-iox","corrupt-data"],"backgroundTag":"flatbuffer-parse-error","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"}