yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #60393
[Bug 1655710] [NEW] Query parameter validation using json schema - error messages
Public bug reported:
A mechanism to validate query parameters using json schema was added in
the following series:
https://review.openstack.org/#/q/topic:bp/consistent-query-
parameters-validation
The resulting error messages aren't very user friendly though. For
example, if you pass an invalid limit to os-keypairs list, you used to
get a custom message rather than the obscure message generated by json
schema.
Before:
webob.exc.HTTPBadRequest: Invalid input received: limit must be an
integer
After:
nova.exception.ValidationError: Invalid input for query parameters
0. Value: abc. u'abc' does not match '^[0-9]*$'
The exception raised also changed, which may be problematic for API
consumers.
We probably need another layer to transform these generated messages
into something more user friendly, and perhaps consider raising
HTTPBadRequest again with the nicer error message.
** Affects: nova
Importance: Medium
Status: Confirmed
** Tags: api
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1655710
Title:
Query parameter validation using json schema - error messages
Status in OpenStack Compute (nova):
Confirmed
Bug description:
A mechanism to validate query parameters using json schema was added
in the following series:
https://review.openstack.org/#/q/topic:bp/consistent-query-
parameters-validation
The resulting error messages aren't very user friendly though. For
example, if you pass an invalid limit to os-keypairs list, you used to
get a custom message rather than the obscure message generated by json
schema.
Before:
webob.exc.HTTPBadRequest: Invalid input received: limit must be an
integer
After:
nova.exception.ValidationError: Invalid input for query parameters
0. Value: abc. u'abc' does not match '^[0-9]*$'
The exception raised also changed, which may be problematic for API
consumers.
We probably need another layer to transform these generated messages
into something more user friendly, and perhaps consider raising
HTTPBadRequest again with the nicer error message.
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1655710/+subscriptions
Follow ups