Re: Should Web Services be served by a different HTTP n+1?

Phillip Hallam-Baker <hallam@gmail.com> Thu, 24 January 2013 20:35 UTC

Return-Path: <ietf-http-wg-request@listhub.w3.org>
X-Original-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Delivered-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 823CC11E809B for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 24 Jan 2013 12:35:58 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -9.768
X-Spam-Level:
X-Spam-Status: No, score=-9.768 tagged_above=-999 required=5 tests=[AWL=0.830, BAYES_00=-2.599, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-8]
Received: from mail.ietf.org ([64.170.98.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lYSO15rXgA+K for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 24 Jan 2013 12:35:57 -0800 (PST)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) by ietfa.amsl.com (Postfix) with ESMTP id A993C11E809A for <httpbisa-archive-bis2Juki@lists.ietf.org>; Thu, 24 Jan 2013 12:35:57 -0800 (PST)
Received: from lists by frink.w3.org with local (Exim 4.72) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1TyTVc-0008Gb-Gz for ietf-http-wg-dist@listhub.w3.org; Thu, 24 Jan 2013 20:34:52 +0000
Resent-Date: Thu, 24 Jan 2013 20:34:52 +0000
Resent-Message-Id: <E1TyTVc-0008Gb-Gz@frink.w3.org>
Received: from maggie.w3.org ([128.30.52.39]) by frink.w3.org with esmtp (Exim 4.72) (envelope-from <hallam@gmail.com>) id 1TyTVX-0008Fj-G0 for ietf-http-wg@listhub.w3.org; Thu, 24 Jan 2013 20:34:47 +0000
Received: from mail-wi0-f171.google.com ([209.85.212.171]) by maggie.w3.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.72) (envelope-from <hallam@gmail.com>) id 1TyTVW-0006zc-2L for ietf-http-wg@w3.org; Thu, 24 Jan 2013 20:34:47 +0000
Received: by mail-wi0-f171.google.com with SMTP id hn14so832417wib.4 for <ietf-http-wg@w3.org>; Thu, 24 Jan 2013 12:34:19 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=H5NYZqlfnx0tc8WZ0d2XLyve/G21qy9/vfaxwlLZg6Y=; b=mkYqz8CI+zN+UiY7ifAf9hUrGgWHILeIWS4H9o/CW2rLEY9iIi9r2eJTVRa2UUqvSC V6t6j7LNx7/LZI9PYKlgNtmW2tWvpd9Z86E6lAZXGFIL2YhyykInIZPCTqQhv6byj8XZ nZC9K6wKYw3ckDQmk0ITM+Bmxv6CNvoJfuuTjqUL1iNe4d09JRzsT8MGcz+N6pIoD1+8 LoXIGOsxUWkDmra5iZH0MTauDsejzSOJ8etgizECzPTxJ6irAmX60mvGD1w9e0DGWaQt e9ypNFWndgSgqHkuKlLz0Leo5/J/Ed1wQfe3VF6r6NJ+DGD2PHdH0bsswQeMgw0HFfuQ dlKg==
MIME-Version: 1.0
X-Received: by 10.180.85.103 with SMTP id g7mr5227651wiz.29.1359059659771; Thu, 24 Jan 2013 12:34:19 -0800 (PST)
Received: by 10.194.136.66 with HTTP; Thu, 24 Jan 2013 12:34:19 -0800 (PST)
In-Reply-To: <CAK3OfOgESpx+a2-767ejoksMgXsTjFgQpr4r9fvFjr3O1T33LA@mail.gmail.com>
References: <CAMm+LwgTSw05QLUspAbAyRSWfd8j27fhwPiDSF_TaD8LevftBA@mail.gmail.com> <CAHBU6iu-bH_cEEVNq0CxcHZELjAFZ0Vb6d8cN5y_qbmu6xCKFg@mail.gmail.com> <CAG47hGa+Hp4LmepYOsCXM9p-L-XrP3a6o1S3RorEYiJK8SEmFA@mail.gmail.com> <51015378.5080106@gmx.de> <CAK3OfOgESpx+a2-767ejoksMgXsTjFgQpr4r9fvFjr3O1T33LA@mail.gmail.com>
Date: Thu, 24 Jan 2013 15:34:19 -0500
Message-ID: <CAMm+Lwi9QM4eaYBePCDxhOoLw+W2jrabhFAFHWq6FhwF=acVLQ@mail.gmail.com>
From: Phillip Hallam-Baker <hallam@gmail.com>
To: Nico Williams <nico@cryptonector.com>
Cc: Julian Reschke <julian.reschke@gmx.de>, Grahame Grieve <grahame@healthintersections.com.au>, Tim Bray <tbray@textuality.com>, "ietf-http-wg@w3.org Group" <ietf-http-wg@w3.org>
Content-Type: multipart/alternative; boundary="f46d043bdce63fcd7304d40ebc55"
Received-SPF: pass client-ip=209.85.212.171; envelope-from=hallam@gmail.com; helo=mail-wi0-f171.google.com
X-W3C-Hub-Spam-Status: No, score=-3.0
X-W3C-Hub-Spam-Report: AWL=-2.193, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001
X-W3C-Scan-Sig: maggie.w3.org 1TyTVW-0006zc-2L c4575f62ca345ad97b32ab7809eaad81
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Should Web Services be served by a different HTTP n+1?
Archived-At: <http://www.w3.org/mid/CAMm+Lwi9QM4eaYBePCDxhOoLw+W2jrabhFAFHWq6FhwF=acVLQ@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/16175
X-Loop: ietf-http-wg@w3.org
Resent-Sender: ietf-http-wg-request@w3.org
Precedence: list
List-Id: <ietf-http-wg.w3.org>
List-Help: <http://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

On Thu, Jan 24, 2013 at 12:48 PM, Nico Williams <nico@cryptonector.com>wrote:

> On Thu, Jan 24, 2013 at 9:30 AM, Julian Reschke <julian.reschke@gmx.de>
> wrote:
> > On 2013-01-24 04:18, Grahame Grieve wrote:
> >> What would be right http status code to use? It's a client error, right?
> >> The nearest appropriate status code would be 422, but I'm not sure
> >> whether that can be used outside webdav. Either way, there's a bunch
> >
> > It can.
> >
> > [...]
> >
> > Augmenting error handling for web services is an interesting topic. See
> > prior proposals about Link relations, or a JSON typed response body
> format
> > for 4xx/5xx.
>
> I've seen APIs that handle errors in JSON-encoded response bodies,
> including one that always returns success in HTTP but errors in the
> response body, which is kinda weird, but if none of the HTTP status
> codes make sense...  (that was the author's defense).
>

It makes perfect sense from a layering perspective.

In an RPC call I probably want HTTP errors to be strictly limited to
reporting network failures. 'entry not found' is a completely different
result from 'machine is down'

entry not found is arguably a successful transaction that returned an empty
list of results.



-- 
Website: http://hallambaker.com/