{"record":{"id":"2904fe7a39a52423","repo":"risingwavelabs/risingwave","slug":"unsupported-webhook-payload-format-format","errorCode":null,"errorMessage":"unsupported webhook payload format `{format}`","messagePattern":"unsupported webhook payload format `(.+?)`","errorType":"http","errorClass":null,"httpStatus":400,"severity":"warning","filePath":"src/frontend/src/webhook/payload.rs","lineNumber":82,"sourceCode":"                Err(error) if column.is_pk => Err(error),\n                Err(_) => Ok(None),\n            },\n        )\n        .collect::<AccessResult<Vec<_>>>()\n        .map(OwnedRow::new);\n    row.map_err(|e| {\n        err(\n            anyhow!(e).context(\"failed to decode webhook JSON payload\"),\n            StatusCode::UNPROCESSABLE_ENTITY,\n        )\n    })\n}\n\nfn json_properties_from_headers(headers: &HeaderMap) -> Result<JsonProperties> {\n    let format = header_value(headers, WEBHOOK_FORMAT_HEADER)?.unwrap_or_else(|| \"plain\".into());\n    if !format.eq_ignore_ascii_case(\"plain\") {\n        return Err(err(\n            anyhow!(\"unsupported webhook payload format `{format}`\"),\n            StatusCode::BAD_REQUEST,\n        ));\n    }\n\n    let encode = header_value(headers, WEBHOOK_ENCODE_HEADER)?.unwrap_or_else(|| \"json\".into());\n    if !encode.eq_ignore_ascii_case(\"json\") {\n        return Err(err(\n            anyhow!(\"unsupported webhook payload encoding `{encode}`\"),\n            StatusCode::BAD_REQUEST,\n        ));\n    }\n\n    let timestamp_handling =\n        parse_timestamp_handling(headers, WEBHOOK_JSON_TIMESTAMP_HANDLING_HEADER)?;\n    let timestamptz_handling =\n        parse_timestamptz_handling(headers, WEBHOOK_JSON_TIMESTAMPTZ_HANDLING_HEADER)?;\n    let time_handling = parse_time_handling(headers, WEBHOOK_JSON_TIME_HANDLING_HEADER)?;\n    let bigint_unsigned_handling =","sourceCodeStart":64,"sourceCodeEnd":100,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/frontend/src/webhook/payload.rs#L64-L100","documentation":"The `x-rw-webhook-format` header specified a payload format other than `plain` (case-insensitive). RisingWave webhooks currently only accept plain JSON payloads, so any other format value is rejected with HTTP 400 BAD_REQUEST before decoding starts.","triggerScenarios":"POST with header `x-rw-webhook-format: protobuf`, `csv`, or any value other than `plain` (any casing).","commonSituations":"Producers copy header templates from other systems expecting protobuf-encoded webhooks; a generic webhook sender adds a format header by default; typos like `plainjson` or `json` in the format header.","solutions":["Remove the `x-rw-webhook-format` header entirely (defaults to `plain`).","Set it explicitly to `plain` (case-insensitive).","Send the body as raw plain JSON; use `x-rw-webhook-encode: json` for encoding, not format.","If a non-JSON format is truly needed, transform it client-side before posting.","Check release notes in case a newer RisingWave version adds formats."],"exampleFix":"// before\ncurl -H 'x-rw-webhook-format: protobuf' -d @payload.bin $URL\n// after\ncurl -H 'x-rw-webhook-encode: json' -H 'content-type: application/json' -d '{\"a\":1}' $URL","handlingStrategy":"validation","validationCode":"const SUPPORTED_FORMATS = ['plain'];\nconst fmt = headers['x-rw-webhook-format'];\nif (fmt && !SUPPORTED_FORMATS.includes(String(fmt).toLowerCase()))\n  throw new Error(`unsupported webhook format: ${fmt} (only 'plain')`);","typeGuard":"const isSupportedFormat = (v) => typeof v === 'string' && v.toLowerCase() === 'plain';","tryCatchPattern":"if (!isSupportedFormat(headers['x-rw-webhook-format'] ?? 'plain'))\n  throw new Error('unsupported webhook payload format');\nconst res = await fetch(url, { method: 'POST', headers, body });","preventionTips":["Omit the x-rw-webhook-format header unless you explicitly mean plain","Don't confuse the format header with the encode header","Validate header names/values in the producer SDK","Check RisingWave changelogs for newly supported formats"],"tags":["webhook","http-header","validation"],"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"}