yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #73829
[Bug 1780327] Re: Send a POST request with invalid object in body return 500
Reviewed: https://review.openstack.org/580497
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=d950949b9023669f037e406a6bd930e1d626f109
Submitter: Zuul
Branch: master
commit d950949b9023669f037e406a6bd930e1d626f109
Author: Hongbin Lu <hongbin.lu@xxxxxxxxxx>
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
Change-Id: I3877c18a18ac506dc8f4a9ded2a18b53b9f6cfae
** Changed in: neutron
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1780327
Title:
Send a POST request with invalid object in body return 500
Status in neutron:
Fix Released
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://localhost:9696/v2.0/networks" \
> -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-Request-Id: req-78b967c0-1f30-4e64-9b1c-1d68e019a835
Date: Thu, 05 Jul 2018 20:43:22 GMT
{"NeutronError": {"message": "Request Failed: internal server error
while processing your request.", "type": "HTTPInternalServerError",
"detail": ""}}
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1780327/+subscriptions
References