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

Michael Stillwell <mjs@beebo.org> Wed, 06 March 2013 22:08 UTC

Return-Path: <ithinkihaveacat@gmail.com>
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 121CD11E8142 for <apps-discuss@ietfa.amsl.com>; Wed, 6 Mar 2013 14:08:03 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.378
X-Spam-Level:
X-Spam-Status: No, score=-1.378 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, J_CHICKENPOX_35=0.6, NO_RELAYS=-0.001]
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 GuC9et5RMwVz for <apps-discuss@ietfa.amsl.com>; Wed, 6 Mar 2013 14:08:02 -0800 (PST)
Received: from mail-ia0-x236.google.com (mail-ia0-x236.google.com [IPv6:2607:f8b0:4001:c02::236]) by ietfa.amsl.com (Postfix) with ESMTP id E007B21F89D8 for <apps-discuss@ietf.org>; Wed, 6 Mar 2013 14:08:00 -0800 (PST)
Received: by mail-ia0-f182.google.com with SMTP id w21so1561486iac.13 for <apps-discuss@ietf.org>; Wed, 06 Mar 2013 14:08:00 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:sender:date:x-google-sender-auth:message-id :subject:from:to:cc:content-type; bh=Vxb0iYGad/56Q5/bXPb9PmR68Sqm7qIlD9q+tZJgN+s=; b=HZFHSwmmdAAsPre4ymLQi+T/mbLT2jA9cozV6xZCTr0UDWZE6p4cWTcXX2jIFynGx1 oztNDKjfyevXfWyq3qUAK7wiMSoqos6c0uZ4UGIbkyndws0m8ZopvHr1jqr1TuSTE0WU emexyKwN2vZwV6+BoMe+yXcYviYB61RoIEPRTqLjxuqa0METDF1e/NAkBSCIpdwbbMKP fABX+aHzgpZaDorQi02MXbtDaQ7yuOYPMtRr9GX3mwA5wOhzf95YTw2aEYwpnYJd1QwM up5rmLv6kbuP1NTD2Dh/TKupfa4egYoU4Dg/YGB1cMaiEXxxvBzr4mXE5+e57VUFysx4 mltw==
MIME-Version: 1.0
X-Received: by 10.42.140.72 with SMTP id j8mr32127137icu.37.1362607676302; Wed, 06 Mar 2013 14:07:56 -0800 (PST)
Sender: ithinkihaveacat@gmail.com
Received: by 10.64.97.195 with HTTP; Wed, 6 Mar 2013 14:07:56 -0800 (PST)
Date: Wed, 06 Mar 2013 22:07:56 +0000
X-Google-Sender-Auth: VPcORuC2XjOOU2h9aTpTWaBettI
Message-ID: <CAC5ZT9WndY1JHYWDuGAnd0=Rg6XiNMhtOoTPtUrnk+teZ33ebA@mail.gmail.com>
From: Michael Stillwell <mjs@beebo.org>
To: apps-discuss@ietf.org
Content-Type: text/plain; charset="ISO-8859-1"
Cc: mnot@mnot.net, erik.wilde@emc.com
Subject: [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: Wed, 06 Mar 2013 22:09:54 -0000

Some questions/thoughts on the "Problem Details for HTTP APIs" draft:

http://tools.ietf.org/html/draft-nottingham-json-home-02

The existing approach to handling problems seems to be for clients to
assume that the combination of a URL (or just domain), a status code,
and a media type determines the type of the body.  So clients will
interpret { flickr.com, 4xx, application/json } in one way, and {
twitter.com, 4xx, application/json } in another.

The draft seems to suggest in effect moving the domain name into the
body of the document itself to form a sort of namespace (i.e. as the
problemType key), so that error types can be shared between different
services.  But I'm wondering just how much sharing is actually
possible in practice.  (This question also applies to the similar
vnd.error proposal https://github.com/blongden/vnd.error.)

An example from the draft is an "out-of-credit" error, but thinking
through the various sorts of "out-of-credit" messages I actually
receive, and how I go about remedying the problem (from phone
companies, hosting providers, public transport providers), I can't
think of very much they share, and certainly very little that would be
able to be acted upon in an automated way that did not require
knowledge of the service that generated them.

(I'm assuming that part of the point of the proposal is to establish
better mechanisms for programmatically dealing with and reporting
problems--if the problem reports were going to be interpreted by
humans then you could simply return text/html with whatever body you
wanted.)

Section 4.1 suggests that more complicated domains would be better
served by application-specific formats, and this seems reasonable,
although I don't think I've ever seen such a thing.  So a problem with
a financial transaction might warrant a special problem format defined
by some banking organisation.  (Though I suppose extremely complicated
domains (mortgage application?) might also return a 201 or 202 status,
and put the actual "error" report somewhere else.)  But there doesn't
seem to be much of a meaningful gap between "complicated" domains that
could do with their own problem media type, and domains where the
existing { domain, status, media type } triple approach works out just
fine.





Cheers,
Michael