{"record":{"id":"d7c04adb84825bc0","repo":"risingwavelabs/risingwave","slug":"unrecognized-value-value-for-key","errorCode":null,"errorMessage":"unrecognized value `{value}` for `{key}`","messagePattern":"unrecognized value `(.+?)` for `(.+?)`","errorType":"http","errorClass":null,"httpStatus":400,"severity":"warning","filePath":"src/frontend/src/webhook/payload.rs","lineNumber":123,"sourceCode":"    Ok(JsonProperties {\n        use_schema_registry: false,\n        timestamp_handling,\n        timestamptz_handling,\n        time_handling,\n        bigint_unsigned_handling,\n        handle_toast_columns,\n    })\n}\n\nfn parse_timestamp_handling(\n    headers: &HeaderMap,\n    key: &'static str,\n) -> Result<Option<TimestampHandling>> {\n    match header_value(headers, key)?.as_deref() {\n        Some(\"milli\") => Ok(Some(TimestampHandling::Milli)),\n        Some(\"guess_number_unit\") => Ok(Some(TimestampHandling::GuessNumberUnit)),\n        Some(value) => Err(err(\n            anyhow!(\"unrecognized value `{value}` for `{key}`\"),\n            StatusCode::BAD_REQUEST,\n        )),\n        None => Ok(None),\n    }\n}\n\nfn parse_timestamptz_handling(\n    headers: &HeaderMap,\n    key: &'static str,\n) -> Result<Option<TimestamptzHandling>> {\n    header_value(headers, key)?\n        .as_deref()\n        .map(TimestamptzHandling::from_options)\n        .transpose()\n        .map_err(|e| {\n            err(\n                anyhow!(e).context(\"invalid webhook JSON decoder option\"),\n                StatusCode::BAD_REQUEST,","sourceCodeStart":105,"sourceCodeEnd":141,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/frontend/src/webhook/payload.rs#L105-L141","documentation":"The `x-rw-webhook-json-timestamp-handling` header had a value other than `milli` or `guess_number_unit`. Only those two values (plus absence, meaning default) are recognized; anything else is rejected with HTTP 400 BAD_REQUEST.","triggerScenarios":"POST with header `x-rw-webhook-json-timestamp-handling: seconds`, `auto`, `milliseconds`, or any misspelled value; header set by an SDK using another product's option names.","commonSituations":"Producers guessing option names (`millisecond` instead of `milli`); copy-pasted headers from other ingestion systems; values with typos or embedded whitespace.","solutions":["Set the header to exactly `milli` or `guess_number_unit` (lowercase).","Remove the header to use default handling.","Check spelling/whitespace — values are matched literally.","Consult docs for TimestampHandling values supported by your RisingWave version.","If other semantics are needed, transform timestamps client-side to the expected numeric/string form."],"exampleFix":"// before\n-H 'x-rw-webhook-json-timestamp-handling: milliseconds'\n// after\n-H 'x-rw-webhook-json-timestamp-handling: milli'","handlingStrategy":"validation","validationCode":"const TS_MODES = ['milli', 'guess_number_unit'];\nconst v = headers['x-rw-webhook-json-timestamp-handling'];\nif (v && !TS_MODES.includes(String(v)))\n  throw new Error(`invalid timestamp-handling: ${v} (milli|guess_number_unit)`);","typeGuard":"const isTimestampHandling = (v) => v === 'milli' || v === 'guess_number_unit';","tryCatchPattern":"const v = headers['x-rw-webhook-json-timestamp-handling'];\nif (v && !isTimestampHandling(v)) throw new Error(`unrecognized ${v} for x-rw-webhook-json-timestamp-handling`);","preventionTips":["Keep a shared constant list of valid header values in the producer SDK","Use lowercase exact values — no abbreviations or synonyms","Test webhook headers in staging before production rollout","Omit optional headers unless non-default behavior is required"],"tags":["webhook","http-header","validation","enum"],"backgroundTag":"invalid-enum-value","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}