Send a POST request with invalid object in body return 500
Bug #1780327 reported by
Hongbin Lu
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Fix Released
|
Low
|
Hongbin Lu |
Bug Description
This is an edge case that neutron server should return 400 response, but actually it returned 500
To reproduce:
$ curl -g -i -X POST "http://
> -H "Accept: application/json" -H "Content-Type: application/json" -H "X-Auth-Token: $TOKEN" \
> -d '{"network": "webservers"}'
HTTP/1.1 500 Internal Server Error
Content-Type: application/json
Content-Length: 150
X-Openstack-
Date: Thu, 05 Jul 2018 20:43:22 GMT
{"NeutronError": {"message": "Request Failed: internal server error while processing your request.", "type": "HTTPInternalSe
Changed in neutron: | |
assignee: | nobody → Hongbin Lu (hongbin.lu) |
Changed in neutron: | |
status: | New → In Progress |
Changed in neutron: | |
importance: | Undecided → Low |
To post a comment you must log in.
Reviewed: https:/ /review. openstack. org/580497 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=d950949b902 3669f037e406a6b d930e1d626f109
Committed: https:/
Submitter: Zuul
Branch: master
commit d950949b9023669 f037e406a6bd930 e1d626f109
Author: Hongbin Lu <email address hidden>
Date: Thu Jul 5 20:26:07 2018 +0000
Ensure request's object type is dict
Handle an edge case that API users send a POST/PUT request with
invalid data in request body.
Closes-Bug: #1780327 6dc8f4a9ded2a18 b53b9f6cfae
Change-Id: I3877c18a18ac50