Bug 755625

Summary: API: Non-existent filter does not reply with a 404
Product: [Retired] Pulp Reporter: Peter Meier <peter.meier>
Component: z_otherAssignee: Sayli Karmarkar <skarmark>
Status: CLOSED CURRENTRELEASE QA Contact: Preethi Thomas <pthomas>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: cperry
Target Milestone: ---Keywords: Triaged
Target Release: Sprint 30   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-02-24 20:15:26 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

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.