Bug 749526 - Request for non-existing distro returns "null"/200 instead "not found"/404
Summary: Request for non-existing distro returns "null"/200 instead "not found"/404
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: user-experience
Version: 1.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: Sprint 30
Assignee: Pradeep Kilambi
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks: 753813
TreeView+ depends on / blocked
 
Reported: 2011-10-27 11:08 UTC by Lukas Zapletal
Modified: 2013-09-09 16:28 UTC (History)
1 user (show)

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


Attachments (Terms of Use)

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.


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