Introduce QuicErrorCode::QUIC_INVALID_PRIORITY_UPDATE.

PiperOrigin-RevId: 348474108
Change-Id: Iab3ec1179b9b1baff3f10366b22023399f7ea3a5
diff --git a/quic/core/http/quic_receive_control_stream.cc b/quic/core/http/quic_receive_control_stream.cc
index 17c588d..919bfde 100644
--- a/quic/core/http/quic_receive_control_stream.cc
+++ b/quic/core/http/quic_receive_control_stream.cc
@@ -234,7 +234,7 @@
     int urgency;
     if (!absl::SimpleAtoi(value, &urgency) || urgency < 0 || urgency > 7) {
       stream_delegate()->OnStreamError(
-          QUIC_INVALID_STREAM_ID,
+          QUIC_INVALID_PRIORITY_UPDATE,
           "Invalid value for PRIORITY_UPDATE urgency parameter.");
       return false;
     }
diff --git a/quic/core/quic_error_codes.cc b/quic/core/quic_error_codes.cc
index 1aa9760..8462632 100644
--- a/quic/core/quic_error_codes.cc
+++ b/quic/core/quic_error_codes.cc
@@ -257,6 +257,7 @@
     RETURN_STRING_LITERAL(QUIC_KEY_UPDATE_ERROR);
     RETURN_STRING_LITERAL(QUIC_AEAD_LIMIT_REACHED);
     RETURN_STRING_LITERAL(QUIC_MAX_AGE_TIMEOUT);
+    RETURN_STRING_LITERAL(QUIC_INVALID_PRIORITY_UPDATE);
 
     RETURN_STRING_LITERAL(QUIC_LAST_ERROR);
     // Intentionally have no default case, so we'll break the build
@@ -719,6 +720,9 @@
       return {true, static_cast<uint64_t>(AEAD_LIMIT_REACHED)};
     case QUIC_MAX_AGE_TIMEOUT:
       return {false, static_cast<uint64_t>(QuicHttp3ErrorCode::INTERNAL_ERROR)};
+    case QUIC_INVALID_PRIORITY_UPDATE:
+      return {false, static_cast<uint64_t>(
+                         QuicHttp3ErrorCode::GENERAL_PROTOCOL_ERROR)};
     case QUIC_LAST_ERROR:
       return {false, static_cast<uint64_t>(QUIC_LAST_ERROR)};
   }
diff --git a/quic/core/quic_error_codes.h b/quic/core/quic_error_codes.h
index 20ab087..7c9dec0 100644
--- a/quic/core/quic_error_codes.h
+++ b/quic/core/quic_error_codes.h
@@ -566,8 +566,11 @@
   // Decrypted a 0-RTT packet with a higher packet number than a 1-RTT packet.
   QUIC_INVALID_0RTT_PACKET_NUMBER_OUT_OF_ORDER = 192,
 
+  // Received PRIORITY_UPDATE frame with invalid payload.
+  QUIC_INVALID_PRIORITY_UPDATE = 193,
+
   // No error. Used as bound while iterating.
-  QUIC_LAST_ERROR = 193,
+  QUIC_LAST_ERROR = 194,
 };
 // 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