#[derive(Debug, PartialEq, Eq, thiserror::Error)]
#[non_exhaustive]
pub enum FrameError {
#[error("the HTTP/2 frame payload has an invalid size")]
BadFrameSize,
#[error("the HTTP/2 padding exceeds the frame payload")]
TooMuchPadding,
#[error("the HTTP/2 frame uses an invalid stream ID")]
InvalidStreamId,
#[error("an HTTP/2 stream cannot depend on itself")]
InvalidStreamDependency,
#[error("an HTTP/2 WINDOW_UPDATE increment cannot be zero")]
InvalidWindowIncrement,
#[error("an HTTP/2 field block requires the next frame to be CONTINUATION")]
ExpectedContinuation,
#[error("an HTTP/2 CONTINUATION frame does not match an open field block")]
UnexpectedContinuation,
#[error("the HTTP/2 field block contains invalid HPACK data")]
CompressionError,
#[error("the HTTP/2 frame payload is malformed")]
MalformedMessage,
}