QUIC error codes -- too many *and* too few

"Aron ." <aron.schats@gmail.com> Wed, 22 March 2017 17:50 UTC

Return-Path: <aron.schats@gmail.com>
X-Original-To: quic@ietfa.amsl.com
Delivered-To: quic@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 603B8129B72 for <quic@ietfa.amsl.com>; Wed, 22 Mar 2017 10:50:46 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.999
X-Spam-Level:
X-Spam-Status: No, score=-1.999 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3RbO6zEMRELz for <quic@ietfa.amsl.com>; Wed, 22 Mar 2017 10:50:44 -0700 (PDT)
Received: from mail-qt0-x234.google.com (mail-qt0-x234.google.com [IPv6:2607:f8b0:400d:c0d::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 58A1B1294E8 for <quic@ietf.org>; Wed, 22 Mar 2017 10:50:40 -0700 (PDT)
Received: by mail-qt0-x234.google.com with SMTP id i34so158300109qtc.0 for <quic@ietf.org>; Wed, 22 Mar 2017 10:50:40 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=U+in2OFMdBaDLFICUjhMzyDv4a68u+DhEY6CnBj6pJA=; b=NNYcLI50yT7exf9T9mRaYt4WDdelpAz/AR3WkUkvCKFfuo+/6QzDsjjq34rD99WSbl VvG+RwTCCwnoXcHxfYWiPfZxPe/3sCW/JqP0IDgraBoNe4y5KnaViS1zHarQ2zBAsS+v dxB7YnRoELtCd+kUqAi8YnaGPb67v4OBVY1+Gb1Dvs/hdcQAD7BJJbg90BZuY2IvS8Au YrSK+KwXssRxWH9knmCHfgMIoJFMtp2NBKXtiu1+LCjQeixd95+pGHDtzMOpl19rtTVm Q0Kd8Fvo/a1j0PcC7rsb+wyS4AEmPcHLL5mlMONhXPHsxuIhkQ1/1eFV75lzN9Jh6U3v zpDA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=U+in2OFMdBaDLFICUjhMzyDv4a68u+DhEY6CnBj6pJA=; b=iKk4Y9yUJV3iafuJYoFD0fRRHgsDsKzrqlMqOew/xlVgpIwSLKhNTbNqh230pO8quV Uj/ziOyGglPp6XwN6dw3is3P+9QN+RrQH8WT8ZxPlYNUXryetoJlDvNVbkK59Ew1aN1h 0eFXe08gep14HV+plL8XInqdU34b4cVjE/K4p3O9whA8JNB/LSfQOeAvdMFrp81PiqPK y+qnJV9XzB6VQD9D/Zc1ZYNL5cFKjJdKc01B+kidX7gx+EMWVAutqgoHOfunCAbfC/8F ZIaioWTNqJFnUH4JRCVpn5WCyZRukcSaigjpn5HbmjWkTcsd8mNtwm1X5jfOJTpbnqit 5nCA==
X-Gm-Message-State: AFeK/H0NesfVpcY0gQZdiOf9PKGhCl8hEFw07f6z4ZQZ66HQ4rVL+VNCNYI/vwllvWsLua0q31cWoh0Ng3mIUg==
X-Received: by 10.200.47.9 with SMTP id j9mr27677128qta.57.1490205039314; Wed, 22 Mar 2017 10:50:39 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.12.158.41 with HTTP; Wed, 22 Mar 2017 10:50:38 -0700 (PDT)
From: "Aron ." <aron.schats@gmail.com>
Date: Wed, 22 Mar 2017 13:50:38 -0400
Message-ID: <CAGudDpMEw9DwuYg_mgGy6VrS=wdvZ20bzwA7Bs1sAc+gZzKrEw@mail.gmail.com>
Subject: QUIC error codes -- too many *and* too few
To: IETF QUIC WG <quic@ietf.org>
Content-Type: multipart/alternative; boundary="001a113773b402cf31054b556642"
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/rqFwUmeAa8Ot0bwR40K5CcuGd3w>
X-BeenThere: quic@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: Main mailing list of the IETF QUIC working group <quic.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/quic>, <mailto:quic-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/quic/>
List-Post: <mailto:quic@ietf.org>
List-Help: <mailto:quic-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/quic>, <mailto:quic-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 22 Mar 2017 17:50:46 -0000

Dear QUICsters,

I believe that the QUIC protocol specification goes overboard in trying to
have an error code for each error condition.  Of course, the roots of this
are historic: since both first client and server use the same code base, it
makes sense to enumerate all possible errors to facilitate debugging.  (An
error code like QUIC_MAYBE_CORRUPTED_MEMORY is a good example of this.)
However, as the number of QUIC implementations grows, a list of errors this
long and this specific is, I think, ill-advised.

My copy of *HTTP: The Definitive Guide (O'Reilly, 2002)* lists a
grand total of eighteen 400-level codes.  15 years later, Wikipedia's list
of HTTP status codes
<https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#4xx_Client_errors>
has twenty-eight.  draft-ietf-quic-transport.md
<https://github.com/quicwg/base-drafts/blob/master/draft-ietf-quic-transport.md>
has about sixty.  What is the client to do with these error codes?  It can
probably not do much more than log them.

On the server side, finding a matching error code for an error condition
would probably be a difficult task, especially if the implementation folds
several checks into one.  Other error codes are potential information
leaks, such as some crypto-related codes.

In regards to having too few error codes, it would be useful to have two
catch-all error codes (like HTTP 400 and 500), one for client errors and
one for server errors, which could be used (something like a MAY in the
spec?) when an appropriate error code does not exist.

  An aspiring QUIC implementer.