[CONTROLLER-822] HTTP DELETE raised exception Created: 12/Sep/14  Updated: 25/Jul/23  Resolved: 28/Oct/14

Status: Resolved
Project: controller
Component/s: mdsal
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: Jozef Gloncak Assignee: Jozef Gloncak
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: Windows
Platform: PC


Attachments: Text File file_1839.txt    
Issue Links:
Duplicate
is duplicated by CONTROLLER-940 RESTConf Delete on non-existing entry... Resolved
External issue ID: 1839

 Description   

Maybe isn't bug
I specified URI to non existing data. After calling DELETE HTTP operation via restconf I got following exception (see attachment)



 Comments   
Comment by Jozef Gloncak [ 12/Sep/14 ]

Attachment file_1839.txt has been added with description: caught exception

Comment by Jozef Gloncak [ 16/Sep/14 ]

patch set prepared
https://git.opendaylight.org/gerrit/#/c/11232/

Comment by Jozef Gloncak [ 24/Sep/14 ]

https://git.opendaylight.org/gerrit/#/c/11232/
remarks from Tom Pantelis incorporated
(existence of data via read transaction isn't done. exception raised while submiting transaction is caught and analised whether root cause is ModifiedNodeDoesNotExistException)

Comment by Jozef Gloncak [ 14/Oct/14 ]

remark from Tom Pantelis from gerrit

Re: returning success when not found, I'm not sure I agree with that. The RFC says to return 200 on success otherwise an appropriate error code. If the target data does not exist then that does not constitute a successful delete, IMO.

Comment by Jozef Gloncak [ 14/Oct/14 ]

I was just asked by Anton Tkacik to do this kind of fix (return HTTP OK also for case when deleting unexisting resource).

Comment by Tony Tkacik [ 16/Oct/14 ]

We should return appropriate error: 404 in this case, not 204, so client knows
data was already deleted or did not exist in first place.

Comment by Jozef Gloncak [ 17/Oct/14 ]

https://git.opendaylight.org/gerrit/#/c/11232/
Http status code 404 is now returned when sb. tries to delete non existing data.

Comment by Jozef Gloncak [ 28/Oct/14 ]

merged at Oct 27 11:22 AM

Generated at Wed Feb 07 19:53:57 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.