Skip to main content

HTTP/2 Error Codes

HTTP/2 error codes appear in RST_STREAM and GOAWAY frames. Stream-level errors close only the affected stream. Connection-level errors close the entire connection. All codes are defined in RFC 9113 §7.

CodeName & DescriptionStreamConn
0x0

NO_ERROR

NO_ERROR (0x0) indicates that no error occurred.

YesYes
0x1

PROTOCOL_ERROR

PROTOCOL_ERROR (0x1) indicates a generic HTTP/2 protocol violation.

YesYes
0x2

INTERNAL_ERROR

INTERNAL_ERROR (0x2) indicates that the implementation encountered an internal error that is not attributable to the peer's behavior.

YesYes
0x3

FLOW_CONTROL_ERROR

FLOW_CONTROL_ERROR (0x3) is sent when an endpoint receives more data than its flow control window allows.

NoYes
0x4

SETTINGS_TIMEOUT

SETTINGS_TIMEOUT (0x4) is sent when a SETTINGS frame has been sent and the sender does not receive a SETTINGS acknowledgment within an acceptable time.

NoYes
0x5

STREAM_CLOSED

STREAM_CLOSED (0x5) is sent when a frame is received for a stream that is already in the closed state.

YesNo
0x6

FRAME_SIZE_ERROR

FRAME_SIZE_ERROR (0x6) is sent when an HTTP/2 frame's size violates frame-type-specific constraints.

YesYes
0x7

REFUSED_STREAM

REFUSED_STREAM (0x7) is sent in RST_STREAM when the server refuses a stream before any application processing has occurred.

YesNo
0x8

CANCEL

CANCEL (0x8) is sent in RST_STREAM when the sender no longer needs a stream – a client canceling a request it no longer wants, or a server canceling a pushed resource the client doesn't want.

YesNo
0x9

COMPRESSION_ERROR

COMPRESSION_ERROR (0x9) is sent when there is an error in the HPACK header compression state.

NoYes
0xa

CONNECT_ERROR

CONNECT_ERROR (0xa) is sent when the TCP connection established for an HTTP CONNECT tunnel fails or is reset.

YesNo
0xb

ENHANCE_YOUR_CALM

ENHANCE_YOUR_CALM (0xb) is sent when an endpoint detects a peer is exhibiting a behavior that is likely to generate excessive load.

NoYes
0xc

INADEQUATE_SECURITY

INADEQUATE_SECURITY (0xc) is sent when the TLS security parameters of the connection do not meet the minimum requirements for HTTP/2.

NoYes
0xd

HTTP_1_1_REQUIRED

HTTP_1_1_REQUIRED (0xd) is sent when an HTTP/2 server determines the client's request requires HTTP/1.

NoYes