Re: [apps-discuss] draft-nottingham-http-problem

Erik Wilde <dret@berkeley.edu> Sat, 09 March 2013 00:45 UTC

Return-Path: <dret@berkeley.edu>
X-Original-To: apps-discuss@ietfa.amsl.com
Delivered-To: apps-discuss@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id A784721F85B4 for <apps-discuss@ietfa.amsl.com>; Fri, 8 Mar 2013 16:45:46 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.599
X-Spam-Level:
X-Spam-Status: No, score=-6.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, RCVD_IN_DNSWL_MED=-4]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vXnsAlMOXems for <apps-discuss@ietfa.amsl.com>; Fri, 8 Mar 2013 16:45:45 -0800 (PST)
Received: from cm04fe.IST.Berkeley.EDU (cm04fe.IST.Berkeley.EDU [169.229.218.145]) by ietfa.amsl.com (Postfix) with ESMTP id 9763A21F85E7 for <apps-discuss@ietf.org>; Fri, 8 Mar 2013 16:45:45 -0800 (PST)
Received: from 108-67-66-127.lightspeed.sntcca.sbcglobal.net ([108.67.66.127] helo=[192.168.1.64]) by cm04fe.ist.berkeley.edu with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.76) (auth plain:dret@berkeley.edu) (envelope-from <dret@berkeley.edu>) id 1UE7uw-0000eG-Db; Fri, 08 Mar 2013 16:45:45 -0800
Message-ID: <513A8633.4010306@berkeley.edu>
Date: Fri, 08 Mar 2013 16:45:39 -0800
From: Erik Wilde <dret@berkeley.edu>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130216 Thunderbird/17.0.3
MIME-Version: 1.0
To: Ray Polk <ray.polk@oracle.com>
References: <d61b6110-6c95-492c-bf5c-a4306bf5be4c@default>
In-Reply-To: <d61b6110-6c95-492c-bf5c-a4306bf5be4c@default>
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Transfer-Encoding: 7bit
Cc: apps-discuss@ietf.org
Subject: Re: [apps-discuss] draft-nottingham-http-problem
X-BeenThere: apps-discuss@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: General discussion of application-layer protocols <apps-discuss.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/apps-discuss>, <mailto:apps-discuss-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/apps-discuss>
List-Post: <mailto:apps-discuss@ietf.org>
List-Help: <mailto:apps-discuss-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/apps-discuss>, <mailto:apps-discuss-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sat, 09 Mar 2013 00:45:46 -0000

hello ray.

thanks for the feedback.

On 2013-03-08 14:28 , Ray Polk wrote:
> I think http-problem is a good idea, and we're looking at adopting it.
> A few questions:
> Has the notion of errorField or problemPath been considered?  Given a
> problem, say 422, it might be useful to point out the associative array
> entry / attribute / field that was problematic.  The value could be the
> field name or jsonPath to the erroneous field.

this sounds mostly like a validation approach, where you are validating 
the request and then have a specific point where validation failed. 
while this is something that can happen, the question is whether this is 
general enough to warrant a specific field. problems can occur for many 
reasons, and validation is just one part of that.

if such a field was added, the best way to do it might be a fragment 
identifier, because the media type of the request could be anything, and 
maybe the most general way to point to something might be a fragment 
identifier.

> Other than adding additional info to "more", is there any consideration
> for multiple problems in one response?  For instance, there may be more
> than one problematic field in a request.  It would be advantageous to
> report them all at once instead of piecemeal.  Perhaps a subProblem
> field or array that contains additional problems?

again, that sounds a lot like being very validation-oriented. the idea 
is to report HTTP-level problems, not so much validation messages about 
specific fragments where the requests caused validation problems. if 
this kind of validation and reporting resulting errors is what you want 
to do, the "more" is probably the way to go.

> Has anyone written a bit of client code for this yet?

nothing generic that i am aware of, but we're using it in specific 
client code. and maybe it's a bit early for broader adoption because the 
format is still evolving. mark probably can chime in here.

cheers,

dret.

-- 
erik wilde | mailto:dret@berkeley.edu  -  tel:+1-510-2061079 |
            | UC Berkeley  -  School of Information (ISchool) |
            | http://dret.net/netdret http://twitter.com/dret |