Skip to main content

7. Error Codes

Error codes are 32-bit fields used in RST_STREAM and GOAWAY frames to convey the reasons for stream or connection termination.

Error Code Registry

NameCodeDescription
NO_ERROR0x0Graceful shutdown
PROTOCOL_ERROR0x1Protocol error detected
INTERNAL_ERROR0x2Internal error
FLOW_CONTROL_ERROR0x3Flow-control limits exceeded
SETTINGS_TIMEOUT0x4Settings not acknowledged
STREAM_CLOSED0x5Frame received after stream closed
FRAME_SIZE_ERROR0x6Frame size incorrect
REFUSED_STREAM0x7Stream not processed
CANCEL0x8Stream cancelled
COMPRESSION_ERROR0x9Compression state invalid
CONNECT_ERROR0xaTCP connection error
ENHANCE_YOUR_CALM0xbProcessing capacity exceeded
INADEQUATE_SECURITY0xcSecurity requirements not met
HTTP_1_1_REQUIRED0xdUse HTTP/1.1 instead

Usage

Error codes are used in:

  • RST_STREAM frames: To terminate individual streams
  • GOAWAY frames: To terminate connections

Unknown error codes MUST be treated as INTERNAL_ERROR.