Subject: Re: Analysing the HTTP/3 error code space

From: Lucas Pardue <[email-masked]>
Date: Mon, 1 Jul 2019 14:46:48 +0100

On Wed, Jun 26, 2019 at 12:29 AM Mike Bishop <[email-masked]> wrote:
>
> For those not following GitHub closely, I’d like to point out that these proposals have shown up as PRs, and that they have been reviewed by a few of us over there.  I plan to merge later this week, modulo any objections.
>
> #2808 makes the H2 comparison point from PROTOCOL_ERROR to GENERAL_PROTOCOL_ERROR, while noting that H3 has more specific error codes for some things that were PE in H2
> #2813:  Expands the use of REQUEST_CANCELLED to cancelling push streams and removes the more specific error codes for why one might not want the pushed content
> #2814:  Collects anything that could be wrong with the payload of a SETTINGS frame (server settings sent by clients, duplicates) into SETTINGS_ERROR
> #2820:  Groups LIMIT_EXCEEDED and various misuses of Push IDs into a single error code (ID_ERROR) for any misuse of identifiers defined by HTTP
> #2822:  Groups UNKNOWN_STREAM_TYPE, WRONG_STREAM_COUNT, and WRONG_STREAM_DIRECTION into a single error code (STREAM_CREATION_ERROR) for any reason why a newly opened unidirectional stream is unacceptable to the recipient
>

These were merged (thanks Mike!) so I rebased and updated PR 2662 [1]
that replaces HTTP_MALFORMED_FRAME with simpler code points [2]. It
does a few things:

* Resurrects H2's FRAME_SIZE_ERROR but broadens it to include frame
layout errors - name is HTTP_FRAME_ERROR.
* Introduces a new error code HTTP_INVALID_PRIORITY that captures
cases where a frame with valid wire layout attempts to create a
prioritization relationship (see additional point below).
* Replaces occurrences of HTTP_MALFORMED_FRAME with: HTTP_ID_ERROR,
HTTP_FRAME_ERROR, HTTP_INVALID_PRIORITY as appropriate.
* Reshuffles all of the error codes. In doing so, I tried to align the
code space with H2 and avoid there being any gaps.

I'm not 100% convinced we need a HTTP_INVALID_PRIORITY code. I'm open
to simply using HTTP_FRAME_ERROR.

HTTP_SETTINGS_ERROR and HTTP_MISSING_SETTINGS are candidates to be
consolidated (either together, or into another code). This is
dependent on discussion in (and related to) #2783. I suggest we solve
that in a different PR.

Feedback on this thread or the PR is welcome.

[1] https://github.com/quicwg/base-drafts/pull/2662
[2] https://github.com/quicwg/base-drafts/issues/2551