No exception is thrown when there is no class during delete API call

Bug #1587363 reported by Ashish Singh
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Kingbird
Fix Released
Medium
Dimitri Mazmanov

Bug Description

Currently, If there is no class in DB with a specified name then on Delete quota class API call, we get null. There has to be 404 object not found error. We should throw QuotaClassNotFound exception when there is no class with the specified name.

Changed in kingbird:
assignee: nobody → Dimitri Mazmanov (sorantis)
importance: Undecided → Medium
Changed in kingbird:
milestone: none → newton-1
Revision history for this message
Dimitri Mazmanov (sorantis) wrote :

According to the REST API response guidelines, it is correct to send the 404 Not Found code in case an object doesn't exist.
http://i.stack.imgur.com/whhD1.png

Changed in kingbird:
status: New → Invalid
description: updated
Changed in kingbird:
status: Invalid → New
Changed in kingbird:
milestone: newton-1 → 1.0.0
Changed in kingbird:
milestone: 1.0.0 → ocata-1
Changed in kingbird:
status: New → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kingbird (master)

Reviewed: https://review.openstack.org/439524
Committed: https://git.openstack.org/cgit/openstack/kingbird/commit/?id=fce80a3991195be7b0fe058d5fab5f4debe6752b
Submitter: Jenkins
Branch: master

commit fce80a3991195be7b0fe058d5fab5f4debe6752b
Author: Goutham Pratapa <email address hidden>
Date: Wed Mar 1 15:49:42 2017 +0530

    Fix issues related to delete quota-class

    Currently Kingbird doesnot raise any exception if there
    is no class in DB with the specified name.
    With this change we can fix this.
    Refactored some part of the code and added test-cases for the same.

    Closes-Bug: #1587363
    Change-Id: I0953c95459de31e223ec1ef658b76b3ab9d16ea8

Changed in kingbird:
status: Fix Committed → Fix Released
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.