[core] CoMI error codes

peter van der Stok <stokcons@xs4all.nl> Thu, 20 April 2017 09:34 UTC

Return-Path: <stokcons@xs4all.nl>
X-Original-To: core@ietfa.amsl.com
Delivered-To: core@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 6AD6C12EBDD for <core@ietfa.amsl.com>; Thu, 20 Apr 2017 02:34:20 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.621
X-Spam-Level:
X-Spam-Status: No, score=-2.621 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
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 3c2HoDTgEtSJ for <core@ietfa.amsl.com>; Thu, 20 Apr 2017 02:34:18 -0700 (PDT)
Received: from lb1-smtp-cloud3.xs4all.net (lb1-smtp-cloud3.xs4all.net [194.109.24.22]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 7B8F212EBCF for <core@ietf.org>; Thu, 20 Apr 2017 02:34:18 -0700 (PDT)
Received: from webmail.xs4all.nl ([IPv6:2001:888:0:22:194:109:20:200]) by smtp-cloud3.xs4all.net with ESMTP id AZaG1v00R5W6tKc01ZaGsY; Thu, 20 Apr 2017 11:34:16 +0200
Received: from 2001:983:a264:1:dc7e:9a28:c63a:a3ad by webmail.xs4all.nl with HTTP (HTTP/1.1 POST); Thu, 20 Apr 2017 11:34:16 +0200
MIME-Version: 1.0
Content-Type: text/plain; charset="US-ASCII"; format="flowed"
Content-Transfer-Encoding: 7bit
Date: Thu, 20 Apr 2017 11:34:16 +0200
From: peter van der Stok <stokcons@xs4all.nl>
To: Core <core@ietf.org>
Organization: vanderstok consultancy
Reply-To: consultancy@vanderstok.org
Mail-Reply-To: consultancy@vanderstok.org
In-Reply-To: <BN6PR06MB230851E9570F78DF17EFC6B1FE040@BN6PR06MB2308.namprd06.prod.outlook.com>
References: <5ae3648a22ab499f646bfab85b193755@xs4all.nl> <BN6PR06MB230851E9570F78DF17EFC6B1FE040@BN6PR06MB2308.namprd06.prod.outlook.com>
Message-ID: <b95f2c6a8c24bbfe8dfb2e025f32f2aa@xs4all.nl>
X-Sender: stokcons@xs4all.nl
User-Agent: XS4ALL Webmail
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/6h-h5SsMjwyKaQvjCXUYLuV91s0>
Subject: [core] CoMI error codes
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: "Constrained RESTful Environments \(CoRE\) Working Group list" <core.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/core>, <mailto:core-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/core/>
List-Post: <mailto:core@ietf.org>
List-Help: <mailto:core-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/core>, <mailto:core-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 20 Apr 2017 09:34:20 -0000

Hi Core,

Michel makes the remark that the production of comi specific error 
messages needs a better specification.
I thought that this warranted a discussion on the ML.

Michel's proposal is:
to create a typical CoMI method parsing pseudo code. This pseudo code is 
useful to identify which CoAP error codes are generated by the underline 
CoAP library and which are generated by the CoMI specific application 
logic.

For those errors generated by the CoAP library, we should not require 
any payload since such requirement will force implementers to make 
changes to the underline CoAP library. In some cases, such changes are 
not even possible, no access to source code or not allowed by the 
software license.

For CoAP errors generated at the CoMI application logic level, my 
recommendation is still to avoid the definition of specific error codes. 
Such error code are really useful only if a client can automatically fix 
the situation by re-issuing an updated request taking into account the 
initial error. However, I don't see such use cases for these errors. One 
example of such approach is error code 4.13 (Request Entity Too Large) 
which allow a client to switch to block transfer.

If the target for this extra information is debugging, a simple text 
message will do the job. This text message can identify for example the 
exact leaf and specific error condition (e.g. "ip-address, pattern 
mismatch").
______________________________________________

My alternative proposal is:
using the RESTCONF approach, where errors are returned within a YANG 
module instance as specified in section 8 of RFC8040 (RESTCONF). The 
returned content format would then be /application/yang+cbor as proposed 
in an earlier message to this list.


Looking forward to some discussion,

Peter