[openstack-dev] [nova] Should the server create API return 404 errors?

Christopher Yeoh cbkyeoh at gmail.com
Mon Nov 25 23:33:01 UTC 2013


On Tue, Nov 26, 2013 at 9:41 AM, Aaron Rosen <aaronorosen at gmail.com> wrote:

>
>
> On Mon, Nov 25, 2013 at 6:00 PM, Christopher Yeoh <cbkyeoh at gmail.com>wrote:
>
>> On Tue, Nov 26, 2013 at 7:27 AM, Matt Riedemann <
>> mriedem at linux.vnet.ibm.com> wrote:
>>
>>> Aaron Rosen is working a patch [1] to handle a NetworkNotFound exception
>>> in the server create API.  For the V2 API this will return a 400 error.
>>>  For the V3 API this will return a 404 because of a V3-specific patch [2].
>>>  The API docs list 404 as a valid response code, but is it intuitive for a
>>> POST request like this?
>>>
>>>
>> Yea I think in this case we've just got this wrong for the V3 API here.
>> It's validating a parameter, and although the client (glance/neutron etc)
>> may return a 404 to us, we should be returning a 400 (with a decent
>> message) to our client.
>>
>
> I agree, I think 400 makes more sense than 404.  I'll go a head and make
> this change for the v3 API's as well.
>


Thanks for doing this!

Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20131126/35adad4e/attachment.html>


More information about the OpenStack-dev mailing list