{"record":{"id":"9d6ab99e2c947469","repo":"risingwavelabs/risingwave","slug":"http-error-0","errorCode":null,"errorMessage":"Http error: {0}","messagePattern":"Http error: (.+?)","errorType":"exception","errorClass":"SinkError","httpStatus":null,"severity":"error","filePath":"src/connector/src/sink/mod.rs","lineNumber":1130,"sourceCode":"        anyhow::Error,\n    ),\n    #[error(\"config error: {0}\")]\n    Config(\n        #[source]\n        #[backtrace]\n        anyhow::Error,\n    ),\n    #[error(\"coordinator error: {0}\")]\n    Coordinator(\n        #[source]\n        #[backtrace]\n        anyhow::Error,\n    ),\n    #[error(\"ClickHouse error: {0}\")]\n    ClickHouse(String),\n    #[error(\"Redis error: {0}\")]\n    Redis(String),\n    #[error(\"Http error: {0}\")]\n    Http(\n        #[source]\n        #[backtrace]\n        anyhow::Error,\n    ),\n    #[error(\"Mqtt error: {0}\")]\n    Mqtt(\n        #[source]\n        #[backtrace]\n        anyhow::Error,\n    ),\n    #[error(\"Nats error: {0}\")]\n    Nats(\n        #[source]\n        #[backtrace]\n        anyhow::Error,\n    ),\n    #[error(\"Google Pub/Sub error: {0}\")]","sourceCodeStart":1112,"sourceCodeEnd":1148,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/sink/mod.rs#L1112-L1148","documentation":"SinkError::Http(anyhow::Error) in src/connector/src/sink/mod.rs:1130 wraps failures from HTTP-based sink connectors (e.g., the HTTP sink or webhook delivery). It carries the source anyhow::Error with backtrace, typically produced by reqwest transport failures, non-success status handling, or response body issues. It indicates the sink could not deliver the encoded data over HTTP.","triggerScenarios":"CREATE SINK with an HTTP-based connector when: the endpoint URL is unreachable (DNS failure, connection refused, TLS handshake error), the request times out, the server returns an error status the sink treats as failure, or the response cannot be processed as expected.","commonSituations":"Webhook endpoint down or misconfigured (wrong path/port); HTTPS to an endpoint with an untrusted/self-signed certificate; endpoint rate-limiting or 5xx during traffic spikes; proxy/firewall blocking egress from the RisingWave host.","solutions":["Curl the sink endpoint from the RisingWave host with a sample payload to confirm reachability and expected response.","Check the sink URL scheme/port and TLS configuration; add CA trust or use http:// where appropriate.","Inspect the source anyhow::Error/backtrace in RisingWave logs for the exact reqwest cause (DNS, connect, timeout, status).","If the endpoint returns 429/5xx, enable or increase sink retry behavior and check server-side rate limits.","Confirm any required auth headers in the sink definition are still valid."],"exampleFix":"// before: unreachable endpoint\nCREATE SINK http_sink FROM mv WITH (\n  connector = 'http',\n  endpoint = 'http://internal-webhook:9999/hook'\n);\n// after: corrected endpoint verified with curl\nCREATE SINK http_sink FROM mv WITH (\n  connector = 'http',\n  endpoint = 'http://internal-webhook:8080/hook'\n);","handlingStrategy":"retry","validationCode":"// Validate endpoint reachability before creating the sink\ncurl -sS -o /dev/null -w '%{http_code}' -X POST -d '{}' \"$SINK_ENDPOINT\" || echo 'endpoint unreachable'\n// In Rust: do a test request\nlet resp = reqwest::Client::new().post(endpoint).send().await?;\nanyhow::ensure!(resp.status().is_success() || resp.status() == 405, \"endpoint check failed: {}\", resp.status());","typeGuard":"fn is_valid_http_endpoint(url: &str) -> bool {\n    url.starts_with(\"http://\") || url.starts_with(\"https://\")\n}","tryCatchPattern":"// Retry transport failures; surface permanent HTTP status errors\nmatch sink_result {\n    Err(SinkError::Http(e)) if is_retryable(&e) => retry_with_exponential_backoff(),\n    Err(SinkError::Http(e)) => { log_permanent_failure(&e); alert(); }\n    Ok(v) => process(v),\n}","preventionTips":["Smoke-test the webhook/HTTP endpoint with curl from the RisingWave host before creating the sink","Make the endpoint idempotent so retries after timeouts are safe","Install the proper CA bundle for self-signed/internal TLS endpoints","Set explicit connect/read timeouts and align server rate limits with sink throughput","Monitor endpoint 4xx/5xx rates and alert on sustained failures"],"tags":["http","sink","network","risingwave-connector"],"backgroundTag":"http-request-failed","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"}