Re: [Cbor] Draft for an error indication tag (Fwd: I-D Action: draft-richter-cbor-error-tag-00.txt)

Joe Hildebrand <jhildebrand@mozilla.com> Tue, 29 January 2019 16:52 UTC

Return-Path: <jhildebrand@mozilla.com>
X-Original-To: cbor@ietfa.amsl.com
Delivered-To: cbor@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id AEE22130E5B for <cbor@ietfa.amsl.com>; Tue, 29 Jan 2019 08:52:42 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.001
X-Spam-Level:
X-Spam-Status: No, score=-2.001 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=mozilla.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 y3XYHkIZmpbq for <cbor@ietfa.amsl.com>; Tue, 29 Jan 2019 08:52:40 -0800 (PST)
Received: from mail-io1-xd34.google.com (mail-io1-xd34.google.com [IPv6:2607:f8b0:4864:20::d34]) (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 A1471130E59 for <cbor@ietf.org>; Tue, 29 Jan 2019 08:52:38 -0800 (PST)
Received: by mail-io1-xd34.google.com with SMTP id c2so16832799iom.12 for <cbor@ietf.org>; Tue, 29 Jan 2019 08:52:38 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mozilla.com; s=google; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=XJ0DIIviDJLx2sRrPuDiP8qKBEpgAAyT+BIIw8BcyWg=; b=XtINB0y+tXRrcmOs4yExLNghLhtApuU5u8rya2nH5ZSRqeJsC5CAKku1x0aE+nUPdE MM5urnCM/Dl9bde2ac1i7OVMNGYfcHdYC6h6VuS2sPFtSnF4Xel+hPoyUG7KRC2A5J2e arY5UnQjPRJORr4DNg9JBn78IxyEtxv82h+3U=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=XJ0DIIviDJLx2sRrPuDiP8qKBEpgAAyT+BIIw8BcyWg=; b=LsSB07aZOtjOlRKjVIY9gHcLNQN2TfKNV4gxuohlaAeb94Gz0IqXeMrn1o9TV4a4i5 cwyQ02jKe9WQt7NwsCKCYEP9AzAtHS3owIRHOG3UCnQyP63ZJMle/UJUJdGpWa9RB2at KJ6/HS2ws9a2crxmQ3KsdLo9jDJuaKzE/jmOjow5AH6+azlxNLCFpPMpZvlx2JU8PPwf fyyY3oeez9IXvkfrvdTHUMPvds15cxJE/iZ7gKlRUiH8pRMba/ykTsRCoYI2TYLiDPwm 83DlqQDDjSkY8xw77KO6Nxqy7chbwX5iAE40dCMrbyrhrW6HOMpCFMqF1dhDMyuUpfps J0yg==
X-Gm-Message-State: AHQUAuYqdqu86OS8KnWG1TNU1m/h/h9NNUFZhL7f07EhAd1ZysaGBgpb cO6TwkjmNCbqI3+578nggkKfGA==
X-Google-Smtp-Source: AHgI3Iba2Aez3DtJG9WlJZqtrMs7ZunWHA71VO7WAyyEck3lBaKp86QKPVpqktNARKocQxed/BaCdQ==
X-Received: by 2002:a5d:8491:: with SMTP id t17mr823171iom.11.1548780757709; Tue, 29 Jan 2019 08:52:37 -0800 (PST)
Received: from [10.6.17.71] ([128.177.113.102]) by smtp.gmail.com with ESMTPSA id f13sm14971194iol.82.2019.01.29.08.52.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 Jan 2019 08:52:37 -0800 (PST)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 12.2 \(3445.102.3\))
From: Joe Hildebrand <jhildebrand@mozilla.com>
In-Reply-To: <3B817F90-9AAF-4155-8AB3-149159ADF7CA@tzi.org>
Date: Tue, 29 Jan 2019 09:52:36 -0700
Cc: cbor@ietf.org, draft-richter-cbor-error-tag@ietf.org
Content-Transfer-Encoding: quoted-printable
Message-Id: <9EC57DB3-9B8F-47EE-A4B0-E01CAC6B861D@mozilla.com>
References: <154875737663.7749.10582861808400193309@ietfa.amsl.com> <3B817F90-9AAF-4155-8AB3-149159ADF7CA@tzi.org>
To: Carsten Bormann <cabo@tzi.org>
X-Mailer: Apple Mail (2.3445.102.3)
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/HEx9MSyWZxS8CtIRSuttalShfkQ>
Subject: Re: [Cbor] Draft for an error indication tag (Fwd: I-D Action: draft-richter-cbor-error-tag-00.txt)
X-BeenThere: cbor@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Concise Binary Object Representation \(CBOR\)" <cbor.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/cbor>, <mailto:cbor-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cbor/>
List-Post: <mailto:cbor@ietf.org>
List-Help: <mailto:cbor-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/cbor>, <mailto:cbor-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 29 Jan 2019 16:52:43 -0000

I like it.  One thing I would suggest is if a map is used, that a couple of keys are suggested, but not required:

{
  name: "maybe-a-uri-or-classname",
  code: 404, // HTTP-style error code
  message: "human-readable description",
  fileName: "file where error occurred"
  lineNumber: 12, // line in file where error occurred
  columnNumber: 6 // column in file where error occurred
}

This should get a bunch of error patterns to interoperate quickly, including most things derived from JavaScript's Error class.

> On Jan 29, 2019, at 3:27 AM, Carsten Bormann <cabo@tzi.org> wrote:
> 
> Jörg Richter has suggested defining a CBOR Tag for error indications, beyond what the “undefined” simple value can already do.
> I have helped a bit in writing this up.
> Maybe we can have a quick sanity check before we ask IANA to register this Tag.
> (The suggested value will be 101, ASCII ‘e’ for error, exception.)
> 
> Grüße, Carsten
> 
> 
>> Begin forwarded message:
>> 
>> From: internet-drafts@ietf.org
>> Subject: I-D Action: draft-richter-cbor-error-tag-00.txt
>> Date: January 29, 2019 at 11:22:56 GMT+1
>> To: <i-d-announce@ietf.org>
>> Reply-To: internet-drafts@ietf.org
>> Archived-At: <https://mailarchive.ietf.org/arch/msg/i-d-announce/rLnFJ7vaZKn5EcvR869Ol8tAqAk>
>> 
>> 
>> A New Internet-Draft is available from the on-line Internet-Drafts directories.
>> 
>> 
>>        Title           : Concise Binary Object Representation (CBOR) Tag for Error Indications
>>        Authors         : Joerg Richter
>>                          Carsten Bormann
>> 	Filename        : draft-richter-cbor-error-tag-00.txt
>> 	Pages           : 4
>> 	Date            : 2019-01-29
>> 
>> Abstract:
>>   The Concise Binary Object Representation (CBOR, RFC 7049) is a data
>>   format whose design goals include the possibility of extremely small
>>   code size, fairly small message size, and extensibility without the
>>   need for version negotiation.
>> 
>>   In CBOR, one point of extensibility is the definition of CBOR tags.
>>   While CBOR defines representations for null values and for an
>>   undefined value, there is no convention for expressing errors or
>>   exceptions in data structures, where the actual value desired could
>>   not be calculated due to an error.  The present specification defines
>>   a tag for such error indications, enabling the addition of varying
>>   levels of detail.
>> 
>> 
>> The IETF datatracker status page for this draft is:
>> https://datatracker.ietf.org/doc/draft-richter-cbor-error-tag/
>> 
>> There are also htmlized versions available at:
>> https://tools.ietf.org/html/draft-richter-cbor-error-tag-00
>> https://datatracker.ietf.org/doc/html/draft-richter-cbor-error-tag-00
> 
> _______________________________________________
> CBOR mailing list
> CBOR@ietf.org
> https://www.ietf.org/mailman/listinfo/cbor