oven-sh/bun · error · bun_http::Error

HTTP2EnhanceYourCalm

Error message

HTTP2EnhanceYourCalm

What it means

HTTP/2 error variant for ENHANCE_YOUR_CALM: the peer is misbehaving by exceeding pacing limits — classically too many PING frames (beyond SETTINGS_MAX_PINGS?) or abusive request rates. The connection should be backed off and typically retried after a delay rather than treated as a permanent failure.

Solutions

  1. Reduce request or PING rate and retry after a backoff delay
  2. Raise the applicable limit (e.g. SETTINGS_MAX_PINGS) on the server if the traffic pattern is legitimate
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at src/http/error.rs:20 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of oven-sh/bun@8c5296ac45 (2026-08-16). Data as JSON: /api/errors/63176d2640676012. Report an issue: GitHub.

Appendix: source

Thrown at src/http/error.rs:20

#[derive(Debug, Clone, Copy, PartialEq, Eq, thiserror::Error)]
pub enum Error {
    #[error("CompressionFailed")]
    CompressionFailed,
    #[error("Aborted")]
    Aborted,
    #[error("WriteFailed")]
    WriteFailed,
    #[error("HTTP2RefusedStream")]
    HTTP2RefusedStream,
    #[error("HTTP2ContentLengthMismatch")]
    HTTP2ContentLengthMismatch,
    #[error("HTTP2FrameSizeError")]
    HTTP2FrameSizeError,
    #[error("HTTP2ProtocolError")]
    HTTP2ProtocolError,
    #[error("HTTP2FlowControlError")]
    HTTP2FlowControlError,
    #[error("HTTP2EnhanceYourCalm")]
    HTTP2EnhanceYourCalm,
    #[error("HTTP2HeaderListTooLarge")]
    HTTP2HeaderListTooLarge,
    #[error("HTTP2StreamReset")]
    HTTP2StreamReset,
    #[error("HTTP2GoAway")]
    HTTP2GoAway,
    #[error("HTTP2CompressionError")]
    HTTP2CompressionError,
    #[error("Timeout")]
    Timeout,
    #[error("AbortedBeforeConnecting")]
    AbortedBeforeConnecting,
    #[error("InvalidURL")]
    InvalidURL,
    #[error("ERR_TLS_CERT_ALTNAME_INVALID")]
    ERR_TLS_CERT_ALTNAME_INVALID,
    #[error("ClientAborted")]

View on GitHub (pinned to 8c5296ac45)