Bug 962855 - deleting operation history returns 204 when invalid id is specified
Summary: deleting operation history returns 204 when invalid id is specified
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: REST
Version: 4.7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: RHQ 4.8
Assignee: Heiko W. Rupp
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-05-14 15:14 UTC by Libor Zoubek
Modified: 2015-11-02 00:43 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-09-11 09:51:59 UTC
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.