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

HTTP2GoAway

Error message

HTTP2GoAway

What it means

HTTP/2 GOAWAY frame received from the server, indicating the connection is being shut down or that the server encountered a fatal protocol error. All active and idle streams on this connection will fail.

Solutions

  1. Retry the request on a new connection using connection coalescing or a fresh HTTP/2 session
  2. Check server logs for the GOAWAY error code to determine if it's a graceful shutdown or a protocol violation
  3. Implement automatic reconnection logic in the HTTP/2 client to handle server-initiated shutdowns gracefully
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at src/http/error.rs:26 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/77684fc61d833642. Report an issue: GitHub.

Appendix: source

Thrown at src/http/error.rs:26

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

View on GitHub (pinned to 8c5296ac45)