[openstack-dev] [glance][api] Response when a illegal body is sent

Ryan Brown rybrown at redhat.com
Thu Jul 23 16:43:53 UTC 2015

On 07/23/2015 12:13 PM, Jay Pipes wrote:
> On 07/23/2015 10:53 AM, Bunting, Niall wrote:
>> Hi,
>> Currently when a body is passed to an API operation that explicitly
>> does not allow bodies Glance throws a 500.
>> Such as in this bug report:
>> https://bugs.launchpad.net/glance/+bug/1475647 This is an example of
>> a GET however this also applies to other requests.
>> What should Glance do rather than throwing a 500, should it return a
>> 400 as the user provided an illegal body
> Yep, this.

+1, this should be a 400. It would also be acceptable (though less
preferable) to ignore any body on GET requests and execute the request
as normal.

> Best,
> -jay
Ryan Brown / Software Engineer, Openstack / Red Hat, Inc.

More information about the OpenStack-dev mailing list