risingwavelabs/risingwave · error · SinkError

Http error: {0}

Error message

Http error: {0}

What it means

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.

Source

Thrown at src/connector/src/sink/mod.rs:1130

        anyhow::Error,
    ),
    #[error("config error: {0}")]
    Config(
        #[source]
        #[backtrace]
        anyhow::Error,
    ),
    #[error("coordinator error: {0}")]
    Coordinator(
        #[source]
        #[backtrace]
        anyhow::Error,
    ),
    #[error("ClickHouse error: {0}")]
    ClickHouse(String),
    #[error("Redis error: {0}")]
    Redis(String),
    #[error("Http error: {0}")]
    Http(
        #[source]
        #[backtrace]
        anyhow::Error,
    ),
    #[error("Mqtt error: {0}")]
    Mqtt(
        #[source]
        #[backtrace]
        anyhow::Error,
    ),
    #[error("Nats error: {0}")]
    Nats(
        #[source]
        #[backtrace]
        anyhow::Error,
    ),
    #[error("Google Pub/Sub error: {0}")]

View on GitHub (pinned to 6469eb736d)

Solutions

  1. Curl the sink endpoint from the RisingWave host with a sample payload to confirm reachability and expected response.
  2. Check the sink URL scheme/port and TLS configuration; add CA trust or use http:// where appropriate.
  3. Inspect the source anyhow::Error/backtrace in RisingWave logs for the exact reqwest cause (DNS, connect, timeout, status).
  4. If the endpoint returns 429/5xx, enable or increase sink retry behavior and check server-side rate limits.
  5. Confirm any required auth headers in the sink definition are still valid.

Example fix

// before: unreachable endpoint
CREATE SINK http_sink FROM mv WITH (
  connector = 'http',
  endpoint = 'http://internal-webhook:9999/hook'
);
// after: corrected endpoint verified with curl
CREATE SINK http_sink FROM mv WITH (
  connector = 'http',
  endpoint = 'http://internal-webhook:8080/hook'
);
Defensive patterns

Strategy: retry

Validate before calling

// Validate endpoint reachability before creating the sink
curl -sS -o /dev/null -w '%{http_code}' -X POST -d '{}' "$SINK_ENDPOINT" || echo 'endpoint unreachable'
// In Rust: do a test request
let resp = reqwest::Client::new().post(endpoint).send().await?;
anyhow::ensure!(resp.status().is_success() || resp.status() == 405, "endpoint check failed: {}", resp.status());

Type guard

fn is_valid_http_endpoint(url: &str) -> bool {
    url.starts_with("http://") || url.starts_with("https://")
}

Try / catch

// Retry transport failures; surface permanent HTTP status errors
match sink_result {
    Err(SinkError::Http(e)) if is_retryable(&e) => retry_with_exponential_backoff(),
    Err(SinkError::Http(e)) => { log_permanent_failure(&e); alert(); }
    Ok(v) => process(v),
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Understand the failure class

Background: 'Something went wrong' / 'Request failed (500)' / 'HTTP error! status: 404' — what failed HTTP requests actually mean and how to find the real cause — this error's family across 28 libraries.

Related errors


AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11). Data as JSON: /api/errors/9d6ab99e2c947469. Report an issue: GitHub.