Use IETF QPACK error codes on the wire.
gfe-relnote: n/a, change to QUIC v99-only code. Protected by existing disabled gfe2_reloadable_flag_quic_enable_version_99.
PiperOrigin-RevId: 275232371
Change-Id: Id3bd3819b69167e92de6601f0cd146e084b2bee7
diff --git a/quic/core/quic_error_codes.h b/quic/core/quic_error_codes.h
index ce5c721..9b3fab2 100644
--- a/quic/core/quic_error_codes.h
+++ b/quic/core/quic_error_codes.h
@@ -342,8 +342,13 @@
// QuicTransport received invalid client indication.
QUIC_TRANSPORT_INVALID_CLIENT_INDICATION = 125,
+ // Internal error codes for QPACK errors.
+ QUIC_QPACK_DECOMPRESSION_FAILED = 126,
+ QUIC_QPACK_ENCODER_STREAM_ERROR = 127,
+ QUIC_QPACK_DECODER_STREAM_ERROR = 128,
+
// No error. Used as bound while iterating.
- QUIC_LAST_ERROR = 126,
+ QUIC_LAST_ERROR = 129,
};
// QuicErrorCodes is encoded as four octets on-the-wire when doing Google QUIC,
// or a varint62 when doing IETF QUIC. Ensure that its value does not exceed
@@ -359,6 +364,14 @@
// Returns the name of the QuicErrorCode as a char*
QUIC_EXPORT const char* QuicErrorCodeToString(QuicErrorCode error);
+// Wire values for QPACK errors.
+// https://quicwg.org/base-drafts/draft-ietf-quic-qpack.html#error-code-registration
+enum QuicHttpQpackErrorCode {
+ IETF_QUIC_HTTP_QPACK_DECOMPRESSION_FAILED = 0x200,
+ IETF_QUIC_HTTP_QPACK_ENCODER_STREAM_ERROR = 0x201,
+ IETF_QUIC_HTTP_QPACK_DECODER_STREAM_ERROR = 0x202
+};
+
QUIC_EXPORT_PRIVATE inline std::string HistogramEnumString(
QuicErrorCode enum_value) {
return QuicErrorCodeToString(enum_value);