<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 12 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.hoenzb
{mso-style-name:hoenzb;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">Duncan Thomas [mailto:duncan.thomas@gmail.com] on Wednesday, February 04, 2015 8:34 AM wrote:
<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">The downside of numbers rather than camel-case text is that they are less likely to stick in the memory of regular users. Not a huge think, but a reduction in usability, I think. On the other hand they might
lead to less guessing about the error with insufficient info, I suppose.<o:p></o:p></p>
</div>
<p class="MsoNormal">To make the global registry easier, we can just use a per-service prefix, and then keep the error catalogue in the service code repo, pulling them into some sort of release periodically<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><i><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">[Rockyg] In discussions at the summit about assigning error codes, we determined it would be pretty straightforward to build a tool that could be called
when a new code was needed and it would both assign an unused code and insert the error summary for the code in the DB it would keep to ensure uniqueness. If you didn’t provide a summary, it wouldn’t spit out an error code;-) Simple little tool that could
be in oslo, or some cross-project code location.<o:p></o:p></span></i></b></p>
<p class="MsoNormal"><b><i><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></i></b></p>
<p class="MsoNormal"><b><i><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">--Rocky<o:p></o:p></span></i></b></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal">On 3 February 2015 at 03:24, Sean Dague <<a href="mailto:sean@dague.net" target="_blank">sean@dague.net</a>> wrote:<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">On 02/02/2015 05:35 PM, Jay Pipes wrote:<br>
> On 01/29/2015 12:41 PM, Sean Dague wrote:<br>
>> Correct. This actually came up at the Nova mid cycle in a side<br>
>> conversation with Ironic and Neutron folks.<br>
>><br>
>> HTTP error codes are not sufficiently granular to describe what happens<br>
>> when a REST service goes wrong, especially if it goes wrong in a way<br>
>> that would let the client do something other than blindly try the same<br>
>> request, or fail.<br>
>><br>
>> Having a standard json error payload would be really nice.<br>
>><br>
>> {<br>
>> fault: ComputeFeatureUnsupportedOnInstanceType,<br>
>> messsage: "This compute feature is not supported on this kind of<br>
>> instance type. If you need this feature please use a different instance<br>
>> type. See your cloud provider for options."<br>
>> }<br>
>><br>
>> That would let us surface more specific errors.<br>
> <snip><br>
>><br>
>> Standardization here from the API WG would be really great.<br>
><br>
> What about having a separate HTTP header that indicates the "OpenStack<br>
> Error Code", along with a generated URI for finding more information<br>
> about the error?<br>
><br>
> Something like:<br>
><br>
> X-OpenStack-Error-Code: 1234<br>
> X-OpenStack-Error-Help-URI: <a href="http://errors.openstack.org/1234" target="_blank">
http://errors.openstack.org/1234</a><br>
><br>
> That way is completely backwards compatible (since we wouldn't be<br>
> changing response payloads) and we could handle i18n entirely via the<br>
> HTTP help service running on <a href="http://errors.openstack.org" target="_blank">
errors.openstack.org</a>.<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal">That could definitely be implemented in the short term, but if we're<br>
talking about API WG long term evolution, I'm not sure why a standard<br>
error payload body wouldn't be better.<br>
<br>
The if we are going to having global codes that are just numbers, we'll<br>
also need a global naming registry. Which isn't a bad thing, just<br>
someone will need to allocate the numbers in a separate global repo<br>
across all projects.<br>
<span style="color:#888888"><br>
<span class="hoenzb"> -Sean</span></span><o:p></o:p></p>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
--<br>
Sean Dague<br>
<a href="http://dague.net" target="_blank">http://dague.net</a><o:p></o:p></p>
</div>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" target="_blank">
OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><o:p></o:p></p>
</div>
<p class="MsoNormal"><br>
<br clear="all">
<br>
-- <o:p></o:p></p>
<div>
<p class="MsoNormal">Duncan Thomas<o:p></o:p></p>
</div>
</div>
</div>
</body>
</html>