[openstack-dev] [api][nova] Openstack HTTP error codes
Ken'ichi Ohmichi
ken1ohmichi at gmail.com
Mon Feb 2 05:28:52 UTC 2015
2015-01-30 18:13 GMT+09:00 Simon Pasquier <spasquier at mirantis.com>:
> On Fri, Jan 30, 2015 at 3:05 AM, Kenichi Oomichi <oomichi at mxs.nes.nec.co.jp>
> wrote:
>>
>> > -----Original Message-----
>> > From: Roman Podoliaka [mailto:rpodolyaka at mirantis.com]
>> > Sent: Friday, January 30, 2015 2:12 AM
>> > To: OpenStack Development Mailing List (not for usage questions)
>> > Subject: Re: [openstack-dev] [api][nova] Openstack HTTP error codes
>> >
>> > Hi Anne,
>> >
>> > I think Eugeniya refers to a problem, that we can't really distinguish
>> > between two different badRequest (400) errors (e.g. wrong security
>> > group name vs wrong key pair name when starting an instance), unless
>> > we parse the error description, which might be error prone.
>>
>> Yeah, current Nova v2 API (not v2.1 API) returns inconsistent messages
>> in badRequest responses, because these messages are implemented at many
>> places. But Nova v2.1 API can return consistent messages in most cases
>> because its input validation framework generates messages
>> automatically[1].
>
>
> When you say "most cases", you mean JSON schema validation only, right?
> IIUC, this won't apply to the errors described by the OP such as invalid key
> name, unknown security group, ...
Yeah, right.
I implied that in "most cases" and I have one patch[1] for covering them.
By the patch, the sample messages also will be based on the same
format and be consistent.
The other choice we have is CamelCase exception as the fist mail, that
also is interesting.
Thanks
Ken Ohmichi
---
[1]: https://review.openstack.org/#/c/151954
More information about the OpenStack-dev
mailing list