oven-sh/bun · error · TypeError
HTTP2FrameSizeError
HTTP2FrameSizeError
Error message
HTTP2FrameSizeError
What it means
HTTP/2 error variant mapped from the h2 protocol error code FRAME_SIZE_ERROR: a peer sent a frame whose length violates the spec or the negotiated SETTINGS_MAX_FRAME_SIZE. It is produced while encoding/decoding frames in Bun's HTTP/2 layer (src/http) and signals a protocol violation by the remote endpoint.
Solutions
- Ensure the client/sender respects SETTINGS_MAX_FRAME_SIZE and splits large payloads into conforming frames
- If acting as the sender, cap DATA frame payloads at the peer-advertised max frame size
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at src/http/error.rs:14 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/02e6fb732fbce04f.
Report an issue: GitHub.
Appendix: source
Thrown at src/http/error.rs:14
#[allow(non_camel_case_types)]
#[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")]View on GitHub (pinned to 8c5296ac45)