Send a POST request with invalid object in body return 500

Bug #1780327 reported by Hongbin Lu
6
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://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": ""}}

Hongbin Lu (hongbin.lu)
Changed in neutron:
assignee: nobody → Hongbin Lu (hongbin.lu)
Changed in neutron:
status: New → In Progress
zhaobo (zhaobo6)
Changed in neutron:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

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 <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
    Change-Id: I3877c18a18ac506dc8f4a9ded2a18b53b9f6cfae

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 13.0.0.0b3

This issue was fixed in the openstack/neutron 13.0.0.0b3 development milestone.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.