The last round of reviews for https://review.openstack.org/#/c/14219/ specified a few more areas for improvement in validation code that we could do.
One is to no longer catch generic Exceptions like AttributeError, etc. and convert them into HTTP 400s, as it is possible that those errors are actually the result of internal server errors (i.e., should be HTTP 500s). Ideally, we could catch these closer to the source where it was possible to tell if they happened during input validation (i.e.., are a 400) or later in server processing (i.e., are a 500).
Also, there are a couple cases where the validation messages could be improved, in particular, places where we say something like "invalid fixes ip", but then print the entire list of fixed IPs. Ideally we would either report that the item is not a list, or indicate that a particular list member was detected as invalid.
Does HTTP 400 make sense for this test?
quantum/ quantum/ tests/unit/ test_db_ plugin. py, line 602: invalid_ json_400( self): update_ request( 'networks' ,
'{{"name" : "aaa"}}',
net['network' ]['id'] ) response( self.api)
self. assertEqual( res.status_ int, 400)
def test_update_
with self.network() as net:
req = self.new_
res = req.get_