{"record":{"id":"0b2645a7dc331981","repo":"influxdata/influxdb","slug":"invalid-request-0","errorCode":null,"errorMessage":"invalid request: {0}","messagePattern":"invalid request: (.+?)","errorType":"http","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"influxdb3_server/src/http.rs","lineNumber":391,"sourceCode":"    #[error(\"The following Database does not exist: {0}\")]\n    MissingDb(String),\n\n    #[error(\"The following Database Table does not exist: {0}\")]\n    MissingTable(String),\n\n    #[error(\"Cannot parse the given human time: {0}\")]\n    ParsingHumanTime(#[source] humantime::DurationError),\n\n    #[error(\"Cannot parse the timestamp: {0}\")]\n    ParsingTimestamp(#[from] chrono::ParseError),\n\n    #[error(\"Timestamp is out of range\")]\n    TimestampOutOfRange,\n\n    #[error(\"Current node mode does not use the processing engine\")]\n    NoProcessingEngine,\n\n    #[error(\"invalid request: {0}\")]\n    InvalidRequest(String),\n\n    #[error(transparent)]\n    LegacyWriteParse(#[from] WriteParseError),\n}\n\n#[derive(Debug, Error)]\npub(crate) enum AuthenticationError {\n    #[error(\"the request was not authenticated\")]\n    Unauthenticated,\n    #[error(\n        \"Authorization header was malformed, the request was not in the form of 'Authorization: <auth-scheme> <token>', supported auth-schemes are Bearer, Token and Basic\"\n    )]\n    MalformedRequest,\n    #[error(\"requestor is forbidden from requested resource\")]\n    Forbidden,\n    #[error(\"to str error: {0}\")]\n    ToStr(#[from] hyper::header::ToStrError),","sourceCodeStart":373,"sourceCodeEnd":409,"githubUrl":"https://github.com/influxdata/influxdb/blob/06200ef96ba82c5f6727e5038a83af8e722c6875/influxdb3_server/src/http.rs#L373-L409","documentation":"Error variant `InvalidRequest(String)` in the ErrorWrite enum in influxdb3_server/src/http.rs. It is a generic catch-all for write-path HTTP requests that fail validation, carrying the specific reason in the message payload.","triggerScenarios":"Any write API call (e.g. line-protocol or JSON write endpoints) whose payload fails request-level validation: malformed line protocol, unsupported parameters, bad content-type, or semantic checks in the write handler that produce a reason string.","commonSituations":"Client SDKs sending line protocol with unescaped special characters; missing or wrong `Content-Type`/`Accept` headers; passing an unsupported query parameter to /write; upgrading server versions introduces new validation the old client does not satisfy.","solutions":["Read the embedded message after 'invalid request: ' to identify the exact validation failure","Validate line protocol and query parameters against the InfluxDB 3 write API docs before sending","Ensure correct Content-Type (e.g. text/plain for line protocol) and escape special characters in measurements/tags"],"exampleFix":"// before\ncurl -X POST 'host/api/v3/write?db=mydb' --data 'm, v=1'\n// after: valid line protocol with proper tags\ncurl -X POST 'host/api/v3/write?db=mydb' -H 'Content-Type: text/plain' --data 'm,t1=a v=1'","handlingStrategy":"validation","validationCode":"function validateWriteRequest(lp, contentType) {\n  if (typeof lp !== 'string' || lp.trim() === '') throw new Error('empty body');\n  if (!/^text\\/plain/.test(contentType)) throw new Error('use Content-Type: text/plain for line protocol');\n}","typeGuard":null,"tryCatchPattern":"try {\n  const res = await fetch(writeUrl, {method: 'POST', body: lp});\n  if (!res.ok) { const msg = await res.text(); throw new Error(`write rejected: ${msg}`); }\n} catch (e) {\n  if (String(e.message).startsWith('invalid request:')) { logValidationError(e.message); }\n  else throw e;\n}","preventionTips":["Lint line protocol locally before sending","Pin and test client SDK versions against your server version after upgrades"],"tags":["http","request-validation","write-api","line-protocol"],"backgroundTag":"invalid-argument-value","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"}