← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1456157] [NEW] Updating image with invalid operation type raises 500

 

Public bug reported:

When trying to update an image using PATCH method I got Internal Server
Error when 'op' (operation) has invalid value. We could consider
changing this behavior to return some kind of 40x message (400
probably).

Steps to reproduce:
URL: http://localhost:9292/v2/images/<image_id>
Headers:
  X-Auth-Token: XYZ
  Content-Type: application/openstack-images-v2.1-json-patch
Data:
[{"path": "/description", "value": "", "op": "axdd"}]

Result: 500 Internal Server Error

I'm opening it as `Opinion`, as there can be a reason why are we
returning 500 instead of some 40x code.

** Affects: glance
     Importance: Undecided
     Assignee: Kamil Rykowski (kamil-rykowski)
         Status: In Progress

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

** Changed in: glance
     Assignee: (unassigned) => Kamil Rykowski (kamil-rykowski)

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1456157

Title:
  Updating image with invalid operation type raises 500

Status in OpenStack Image Registry and Delivery Service (Glance):
  In Progress

Bug description:
  When trying to update an image using PATCH method I got Internal
  Server Error when 'op' (operation) has invalid value. We could
  consider changing this behavior to return some kind of 40x message
  (400 probably).

  Steps to reproduce:
  URL: http://localhost:9292/v2/images/<image_id>
  Headers:
    X-Auth-Token: XYZ
    Content-Type: application/openstack-images-v2.1-json-patch
  Data:
  [{"path": "/description", "value": "", "op": "axdd"}]

  Result: 500 Internal Server Error

  I'm opening it as `Opinion`, as there can be a reason why are we
  returning 500 instead of some 40x code.

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


Follow ups

References