APIdia Launch Partner
Top Description Fields Constructors Methods
jdk.internal.net.http.http3

public final Enum Http3Error

extends Enum<Http3Error>
Class Inheritance
Imports
java.util.HexFormat, .Optional, java.util.stream.Stream, jdk.internal.net.quic.QuicTransportErrors

This enum models HTTP/3 error codes as specified in RFC 9114, Section 8, augmented with QPack error codes as specified in RFC 9204, Section 6.

Field Summary

Modifier and TypeField and Description
pack-priv final long
public static final Http3Error
H3_CLOSED_CRITICAL_STREAM

Critical stream closed error.

public static final Http3Error
H3_CONNECT_ERROR

Connect error.

public static final Http3Error
H3_EXCESSIVE_LOAD

Excessive load error.

public static final Http3Error
H3_FRAME_ERROR

Frame error.

public static final Http3Error
H3_FRAME_UNEXPECTED

Frame unexpected error.

public static final Http3Error
H3_GENERAL_PROTOCOL_ERROR

General protocol error.

public static final Http3Error
H3_ID_ERROR

Stream ID or Push ID error.

public static final Http3Error
H3_INTERNAL_ERROR

Internal error.

public static final Http3Error
H3_MESSAGE_ERROR

Message error.

public static final Http3Error
H3_MISSING_SETTINGS

Missing settings error.

public static final Http3Error
H3_NO_ERROR

No error.

public static final Http3Error
H3_REQUEST_CANCELLED

Request cancelled error.

public static final Http3Error
H3_REQUEST_INCOMPLETE

Request incomplete error.

public static final Http3Error
H3_REQUEST_REJECTED

Request rejected error.

public static final Http3Error
H3_SETTINGS_ERROR

Settings error.

public static final Http3Error
H3_STREAM_CREATION_ERROR

Stream creation error.

public static final Http3Error
H3_VERSION_FALLBACK

Version fallback error

From RFC 9114, Section 8.1:

The requested operation cannot be served over HTTP/3.
The peer should retry over HTTP/1.1.
public static final Http3Error
QPACK_DECODER_STREAM_ERROR

Qpack decoder stream error

From RFC 9204, Section 6:

The encoder failed to interpret a decoder instruction
received on the decoder stream.
public static final Http3Error
QPACK_DECOMPRESSION_FAILED

QPack decompression error

From RFC 9204, Section 6:

The decoder failed to interpret an encoded field section
and is not able to continue decoding that field section.
public static final Http3Error
QPACK_ENCODER_STREAM_ERROR

Qpack encoder stream error.

Constructor Summary

AccessConstructor and Description
private
Http3Error(long errorCode)

Method Summary

Modifier and TypeMethod and Description
public long
code()

public static Optional<Http3Error>
fromCode(long code)

public static boolean

Returns:

true if the given code is Http3Error#H3_NO_ERROR or equivalent
isNoError
(long
an HTTP/3 code error code
code
)

Returns true if the given code is Http3Error#H3_NO_ERROR or equivalent.

public static String
stringForCode(long code)

private static String
unknown(long code)

public static Http3Error
public static Http3Error[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

errorCodeback to summary
pack-priv final long errorCode
H3_CLOSED_CRITICAL_STREAMback to summary
public static final Http3Error H3_CLOSED_CRITICAL_STREAM

Critical stream closed error.

From RFC 9114, Section 8.1:

A stream required by the HTTP/3 connection was closed or reset.
H3_CONNECT_ERRORback to summary
public static final Http3Error H3_CONNECT_ERROR

Connect error.

From RFC 9114, Section 8.1:

The TCP connection established in response to a CONNECT
request was reset or abnormally closed.
H3_EXCESSIVE_LOADback to summary
public static final Http3Error H3_EXCESSIVE_LOAD

Excessive load error.

From RFC 9114, Section 8.1:

The endpoint detected that its peer is exhibiting a behavior
that might be generating excessive load.
H3_FRAME_ERRORback to summary
public static final Http3Error H3_FRAME_ERROR

Frame error.

From RFC 9114, Section 8.1:

A frame that fails to satisfy layout requirements or with
an invalid size was received.
H3_FRAME_UNEXPECTEDback to summary
public static final Http3Error H3_FRAME_UNEXPECTED

Frame unexpected error.

From RFC 9114, Section 8.1:

A frame was received that was not permitted in the
current state or on the current stream.
H3_GENERAL_PROTOCOL_ERRORback to summary
public static final Http3Error H3_GENERAL_PROTOCOL_ERROR

General protocol error.

From RFC 9114, Section 8.1:

Peer violated protocol requirements in a way that does
not match a more specific error code, or endpoint declines
to use the more specific error code.
H3_ID_ERRORback to summary
public static final Http3Error H3_ID_ERROR

Stream ID or Push ID error.

From RFC 9114, Section 8.1:

A Stream ID or Push ID was used incorrectly, such as exceeding
a limit, reducing a limit, or being reused.
H3_INTERNAL_ERRORback to summary
public static final Http3Error H3_INTERNAL_ERROR

Internal error.

From RFC 9114, Section 8.1:

An internal error has occurred in the HTTP stack.
H3_MESSAGE_ERRORback to summary
public static final Http3Error H3_MESSAGE_ERROR

Message error.

From RFC 9114, Section 8.1:

An HTTP message was malformed and cannot be processed.
H3_MISSING_SETTINGSback to summary
public static final Http3Error H3_MISSING_SETTINGS

Missing settings error.

From RFC 9114, Section 8.1:

No SETTINGS frame was received at the beginning of the control
stream.
H3_NO_ERRORback to summary
public static final Http3Error H3_NO_ERROR

No error.

From RFC 9114, Section 8.1:

This is used when the connection or stream
needs to be closed, but there is no error to signal.
H3_REQUEST_CANCELLEDback to summary
public static final Http3Error H3_REQUEST_CANCELLED

Request cancelled error.

From RFC 9114, Section 8.1:

The request or its response (including pushed response) is
cancelled.
H3_REQUEST_INCOMPLETEback to summary
public static final Http3Error H3_REQUEST_INCOMPLETE

Request incomplete error.

From RFC 9114, Section 8.1:

The client's stream terminated without containing a
fully-formed request.
H3_REQUEST_REJECTEDback to summary
public static final Http3Error H3_REQUEST_REJECTED

Request rejected error.

From RFC 9114, Section 8.1:

A server rejected a request without performing any application
processing.
H3_SETTINGS_ERRORback to summary
public static final Http3Error H3_SETTINGS_ERROR

Settings error.

From RFC 9114, Section 8.1:

An endpoint detected an error in the payload of a SETTINGS frame.
H3_STREAM_CREATION_ERRORback to summary
public static final Http3Error H3_STREAM_CREATION_ERROR

Stream creation error.

From RFC 9114, Section 8.1:

The endpoint detected that its peer created a stream that
it will not accept.
H3_VERSION_FALLBACKback to summary
public static final Http3Error H3_VERSION_FALLBACK

Version fallback error

From RFC 9114, Section 8.1:

The requested operation cannot be served over HTTP/3.
The peer should retry over HTTP/1.1.
QPACK_DECODER_STREAM_ERRORback to summary
public static final Http3Error QPACK_DECODER_STREAM_ERROR

Qpack decoder stream error

From RFC 9204, Section 6:

The encoder failed to interpret a decoder instruction
received on the decoder stream.
QPACK_DECOMPRESSION_FAILEDback to summary
public static final Http3Error QPACK_DECOMPRESSION_FAILED

QPack decompression error

From RFC 9204, Section 6:

The decoder failed to interpret an encoded field section
and is not able to continue decoding that field section.
QPACK_ENCODER_STREAM_ERRORback to summary
public static final Http3Error QPACK_ENCODER_STREAM_ERROR

Qpack encoder stream error.

From RFC 9204, Section 6:

The decoder failed to interpret an encoder instruction
received on the encoder stream.

Constructor Detail

Http3Errorback to summary
private Http3Error(long errorCode)

Method Detail

codeback to summary
public long code()
fromCodeback to summary
public static Optional<Http3Error> fromCode(long code)
isNoErrorback to summary
public static boolean isNoError(long code)

Returns true if the given code is Http3Error#H3_NO_ERROR or equivalent. Unknown error codes are treated as equivalent to H3_NO_ERROR

Parameters
code:long

an HTTP/3 code error code

Returns:boolean

true if the given code is Http3Error#H3_NO_ERROR or equivalent

stringForCodeback to summary
public static String stringForCode(long code)
unknownback to summary
private static String unknown(long code)
valueOfback to summary
public static Http3Error valueOf(String name)
valuesback to summary
public static Http3Error[] values()