Bug 749526

Summary: Request for non-existing distro returns "null"/200 instead "not found"/404
Product: [Retired] Pulp Reporter: Lukas Zapletal <lzap>
Component: user-experienceAssignee: Pradeep Kilambi <pkilambi>
Status: CLOSED CURRENTRELEASE QA Contact: Preethi Thomas <pthomas>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 1.0.0CC: skarmark
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:13:30 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 753813    

Description Lukas Zapletal 2011-10-27 11:08:11 UTC
We expect it as 404 "not found" in Katello.

$ curl -H "Content-Type: application/json" -H "Accept: appli -u admin:admin https://localhost/pulp/api/repository/fsdfd/ -w '%{http_code}'

not found 404

^ This is correct

$ curl -H "Content-Type: application/json" -H "Accept: application/ -u admin:admin https://localhost/pulp/api/distribution/fsdfd/ -w '%{http_code}'

null 200

^ This is unexpected, 200 get parsed into Katello which leads to error.

Comment 1 Pradeep Kilambi 2011-11-11 20:13:54 UTC
fixed! commit 62d3c95730d11cc5441b209139e5a8978feb0def

$ curl -k -H "Content-Type: application/json"  -u admin:admin https://localhost/pulp/api/distributions/foo/ -w '%{http_code}'
"No distribution foo"404

Also please note that distribution rest url has been renamed to /distributions/

Comment 2 Jeff Ortel 2011-11-17 03:06:32 UTC
build: 0.249

Comment 3 Preethi Thomas 2011-12-08 19:06:09 UTC
verified
[root@preethi ~]# rpm -q pulp
pulp-0.0.254-2.fc15.noarch


[root@preethi ~]# curl -k -H "Content-Type: application/json" -u admin:admin https://localhost/pulp/api/distributions/fsdfd/ -w '%{http_code}'
"No distribution fsdfd"404[root@preethi ~]#

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