← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1255103] Re: Creating image with invalid_server_id returns wrong exception

 

This is an opinion.  If you think about it from the perspective of using
a garbage server ID, then yeah, it's a 400, but if you think about it
from the perspective of assuming the user isn't providing a garbage
server ID and it can't find it (because it's garbage), then 404 makes
sense.

** Changed in: nova
       Status: New => Opinion

** Tags added: 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/1255103

Title:
  Creating image with invalid_server_id returns wrong exception

Status in OpenStack Compute (Nova):
  Opinion

Bug description:
  When I create image with invalid_server_id( !@$%^&*()), it returns Response "404 Not Found",But I think it should be BadRequest.
  I find the bug in http://logs.openstack.org/41/54941/9/check/check-tempest-devstack-vm-full/b4598a6/

  And I reproduce it with this:
  1.with the json,v2/​{tenant_id}​/servers/action:
  http://200.200.1.14:8774/v2/1c840bbe802c43b7808b1e494518e6a6/servers/!@$%^&*()/action
  {
      "createImage" : {
          "name" : "new-image-name",
          "metadata": {
              "ImageType": "Gold",
              "ImageVersion": "2.0"
          }
      }
  }
  2.the response is:
  {
      "itemNotFound": {
          "message": "Instance could not be found",
          "code": 404
      }
  }

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1255103/+subscriptions