h2_error (h2 v0.6.0)

View Source

HTTP/2 Error Codes (RFC 7540 Section 7)

Error codes are 32-bit integers used in RST_STREAM and GOAWAY frames.

Summary

Functions

Get the numeric code for an error name.

Format an error for display.

Get the error name for a numeric code.

Types

error_code/0

-type error_code() ::
          no_error | protocol_error | internal_error | flow_control_error | settings_timeout |
          stream_closed | frame_size_error | refused_stream | cancel | compression_error |
          connect_error | enhance_your_calm | inadequate_security | http_1_1_required |
          {unknown, non_neg_integer()}.

Functions

code(_)

-spec code(error_code()) -> non_neg_integer().

Get the numeric code for an error name.

format(Code)

-spec format(error_code() | non_neg_integer()) -> string().

Format an error for display.

name(Code)

-spec name(non_neg_integer()) -> error_code().

Get the error name for a numeric code.