Bug 755625 - API: Non-existent filter does not reply with a 404
Summary: API: Non-existent filter does not reply with a 404
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: z_other
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: Sprint 30
Assignee: Sayli Karmarkar
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-11-21 15:58 UTC by Peter Meier
Modified: 2015-03-23 01:11 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-02-24 20:15:26 UTC


Attachments (Terms of Use)

Description Peter Meier 2011-11-21 15:58:39 UTC
Description of problem:

Although Documentation at https://fedorahosted.org/pulp/wiki/UGREST-Filters tells us that "404 Not Found" is returned "if there is no such filter", using the latest public build we get a 200 response containing the string "null".

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

$ rpm -qa | grep pulp
pulp-admin-0.0.244-5.fc15.noarch
pulp-0.0.244-5.fc15.noarch
pulp-common-0.0.244-5.fc15.noarch
mod_wsgi-3.2-6.pulp.fc15.i686
m2crypto-0.21.1.pulp-5.fc15.i686
pulp-client-lib-0.0.244-5.fc15.noarch


How reproducible:

Make a GET request for a single non-existent filter -> Response is "200 OK"
  
Actual results:

200 OK

Expected results:

404 Not found

Additional info:

All the other GET for a single element so far replied 404, which is in line with how common APIs work.

Comment 1 Sayli Karmarkar 2011-11-22 05:27:57 UTC
commit cb3a6f6abe23b222fd47808148ecb13e8ca0b761
Author: Sayli Karmarkar <skarmark>
Date:   Mon Nov 21 20:22:07 2011 -0800

    755625 - Non-existent filter now replies with a 404

Comment 2 Jeff Ortel 2011-11-28 21:37:13 UTC
build: 0.252

Comment 3 Preethi Thomas 2011-11-30 18:22:28 UTC
[root@katello-test ~]# rpm -q pulp
pulp-0.0.252-1.el6.noarch

[root@katello-test ~]#  curl -k -u admin:admin -X GET https://localhost/pulp/api/filters/test/
"A filter with the id, test, does not exist"[root@katello-test ~]#

Comment 4 Preethi Thomas 2012-02-24 20:15:26 UTC
Pulp v1.0 is released
Closed Current Release.

Comment 5 Preethi Thomas 2012-02-24 20:17:02 UTC
Pulp v1.0 is released.


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