Bug 962855

Summary: deleting operation history returns 204 when invalid id is specified
Product: [Other] RHQ Project Reporter: Libor Zoubek <lzoubek>
Component: RESTAssignee: Heiko W. Rupp <hrupp>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.7CC: theute
Target Milestone: ---   
Target Release: RHQ 4.8   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-11 09:51:59 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Libor Zoubek 2013-05-14 15:14:15 UTC
Description of problem:


Version-Release number of selected component (if applicable):
RHQ 4.8-master

How reproducible:always


Steps to Reproduce:
1. do DELETE /operation/history/foo

  
Actual results: server returns 204


Expected results: server should return 404 or 406


Additional info:

Comment 1 Heiko W. Rupp 2013-05-22 07:27:15 UTC
I think the current behavior is correct in the REST sense as 
operations are supposed to be idempotent - you should be able to run them multiple times with the same result (POST is the exception).

The reasoning is that REST is not reduced to REST over http, but could be applied over other transports that are less safe and which may drop packets.

Of course if the parameter is not an integer, an error should be thrown (I think RestEasy may automatically do that anyway).

Comment 2 Heiko W. Rupp 2013-06-07 07:39:43 UTC
Delete operations are by default idempotent and should return a 204 code no matter if the entity existed or not.

I will introduce a 'validate' parameter, that checks for existence and which can then return a 404 code

Comment 3 Heiko W. Rupp 2013-06-07 13:05:14 UTC
master 998ab11

Comment 4 Heiko W. Rupp 2013-09-11 09:51:59 UTC
Bulk closing of old issues now that HRQ 4.9 is in front of the door.

If you think the issue has not been solved, then please open a new bug and mention this one in the description.