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

HTTP2StreamReset

Error message

HTTP2StreamReset

What it means

HTTP/2 error variant for STREAM_RESET / RST_STREAM: the stream was reset before completing — by the peer via RST_STREAM (with codes like CANCEL or REFUSED_STREAM) or due to a mid-stream failure. Requests surfacing this error were aborted at the stream level while the connection itself may remain alive.

Solutions

  1. Catch the error per-request and retry on a new stream idempotently if the operation is safe
  2. If the reset code is CANCEL, treat it as client-initiated cancellation rather than a server failure
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at src/http/error.rs:24 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/55bd03421089d6a1. Report an issue: GitHub.

Appendix: source

Thrown at src/http/error.rs:24

    #[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")]
    ClientAborted,
    #[error("HTTP2Unsupported")]
    HTTP2Unsupported,
    #[error("ConnectionClosed")]

View on GitHub (pinned to 8c5296ac45)