Re: [ietf-types] Review of application/vnd.error+xml and application/vnd.error+json

Jan Algermissen <> Sun, 29 April 2012 20:55 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id DDD1F21F85B5 for <>; Sun, 29 Apr 2012 13:55:27 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -3.641
X-Spam-Status: No, score=-3.641 tagged_above=-999 required=5 tests=[AWL=-1.392, BAYES_00=-2.599, HELO_EQ_DE=0.35]
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id kRq+7o6e3XZo for <>; Sun, 29 Apr 2012 13:55:27 -0700 (PDT)
Received: from ( []) by (Postfix) with ESMTP id E807321F8599 for <>; Sun, 29 Apr 2012 13:55:26 -0700 (PDT)
Received: from [] ( []) by (node=mreu3) with ESMTP (Nemesis) id 0MhJrR-1SbbrB3UvZ-00MLK9; Sun, 29 Apr 2012 22:55:25 +0200
Mime-Version: 1.0 (Apple Message framework v1084)
Content-Type: text/plain; charset="us-ascii"
From: Jan Algermissen <>
In-Reply-To: <>
Date: Sun, 29 Apr 2012 22:55:24 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <>
References: <> <> <> <> <>
To: Ben Longden <>
X-Mailer: Apple Mail (2.1084)
X-Provags-ID: V02:K0:8WPJTLoK4iKqrU0IgDZboPWN+zY2SDPx+U/0PuqY4KR RPgskWeImOGOf17n2bpw8VXeRgNv6HxqiUUAC6RPUBBJzf5Q4y 2zBxi2nLeBu2Iz7FmYnjYo2RiSUKsP23KRGPQqm+y6oeays6zc olM5LEZQbAm6gyULlrQw4ksiv0OXoGrpADoq3ut+Qzy9/ZnIex l9usjdrhe5Dg/8cPxUK+Mb4txAGIeB+Xs7wWvVOQgmgXAj1mF6 d4xsga/2sY0Pjlo196+vAzUpdfNbtFbF8YkwRqKug39GWE3qHT 22MzfoyVuSBAMUYitK+U38HRfKDUyjgXtEVqOXRZAE4CPMZeTi fdjA+6rqK4agrVk5BpmU1sdJz3eco9yVm7Ae/fl5n3zRriFyYB Cf+GEulYIlyTg==
Subject: Re: [ietf-types] Review of application/vnd.error+xml and application/vnd.error+json
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: "Media \(MIME\) type review" <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Sun, 29 Apr 2012 20:55:28 -0000

On Apr 29, 2012, at 3:06 PM, Ben Longden wrote:

> Hi Jan,
> On 29 Apr 2012, at 01:29, Jan Algermissen wrote:
>> E.g. instead of having some "Order does not exist error" design an 'order' resource semantic and use 404. There is no error condition that you cannot express that way, in terms of the uniform interface that HTTP provides.
> Yes and in that situation (Order does not exist), 404 would be the correct response. What if you POST an order for an item, however there is a validation error that prevents the request from being processed. I'd return a 422, perhaps with a text/plain response containing a simple error message. The problem is that without any extra semantics, I cannot for example link to a document that explains what the correct parameters are (accepted values etc), or identify which field contained the error message along side the human readable error.

Ah - I see. Thanks for clarifying. I really thought you meant to use id for the kind of error. Sorry for misunderstanding.

>>> Even your example below is doing that.
>> How so?
>>> If you have a web api's then you *must* communicate using media types over HTTP. In the case of a web client, adopting this proposed standard means this is understood and disparate clients can understand the same message.
>> The uniformity of HTTPs applies to the visibility components have in the *absence* of understanding the entity media types. A cache or monitoring intermediary can take action upon a 404, they cannot do that upon e.g. your proposed id="" attribute.
> Agreed. I'm not advocating this as a replacement to the status code header. The id attribute is for carrying the specific reference to an error log entry on the server. This could be a URL (and perhaps should be a link with a defined rel in the spec, since out of bands information would be required to do anything with it!), but could be a database id with more specific information.

URL sounds best. But I'll take a look at the issue from the 'new' angle. Might not be until Tuesday though.

Again, sorry for the confusion.


>>> If I just use text/plain then I run into problems when I want to represent anything other than just the message (i.e, the id), and then have a requirement for a media type that can represent it.
>> Hmm, but it is exactly the error-id that I am arguing against :-)
> Does that still hold true now that I have explained how I intended the id to be used? Perhaps changing this to a link with rel='service' ( would make more sense.
> Ben.
> _______________________________________________
> ietf-types mailing list