Project

Profile

Help

Issue #457

no error status code when retrieved event listener with a given id does not exist

Added by igulina@redhat.com almost 7 years ago. Updated over 1 year ago.

Status:
CLOSED - WONTFIX
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
1. Low
Version:
2.4 Beta
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

Description of problem:

Version-Release number of selected component (if applicable):
rpm -qa pulp-server
pulp-server-2.4.0-0.20.beta.el6.noarch

How reproducible:
always

Steps to Reproduce:

curl -k -X GET https://admin:admin@localhost/pulp/api/v2/events/

[]

curl -k -X GET https://admin:admin@localhost/pulp/api/v2/events/53a2efa1b7e943519470c186/

{"http_request_method": "GET", "exception": null, "error_message": "Missing resource(s): event_listener=53a2efa1b7e943519470c186", "_href": "/pulp/api/v2/events/53a2efa1b7e943519470c186/", "http_status": 404, "error": {"code": "PLP0009", "data": {"resources": {"event_listener": "53a2efa1b7e943519470c186"}}, "description": "Missing resource(s): event_listener=53a2efa1b7e943519470c186", "sub_errors": []}, "traceback": null, "resources": {"event_listener": "53a2efa1b7e943519470c186"}}

Expected results:

HTTP/1.1 404 Not Found
Date: Thu, 19 Jun 2014 14:30:34 GMT
Server: Apache/2.2.15 (Red Hat)
Content-Length: 9
Connection: close
Content-Type: text/html; charset=UTF-8

not found

+ This bug was cloned from Bugzilla Bug #1111297 +

Associated revisions

Revision a0077c12 View on GitHub
Added by daviddavis 6 months ago

Allow plugins to configure python_version

fixes #457

History

#1 Updated by bcourt almost 7 years ago

This is returning a 404. It is returning more data in addition to the 404 but the HTTP error code is being returned properly.

+ This comment was cloned from Bugzilla #1111297 comment 1 +

#2 Updated by jcline@redhat.com almost 7 years ago

I've untriaged this after a discussion with Barnaby. We aren't terribly consistent about what we return when a 404 occurs, so we need to decide what the correct response is and be consistent with that decision. Below are two possible results for a 404.

This is the output for a missing event listener:

curl -i -H "Accept: application/json" -X GET -u admin:admin -k 'https://localhost/pulp/api/v2/events/notanevent/'
HTTP/1.1 404 Not Found
Date: Thu, 07 Aug 2014 13:10:17 GMT
Server: Apache/2.4.10 (Fedora) OpenSSL/1.0.1e-fips mod_wsgi/3.5 Python/2.7.5
Content-Encoding: utf-8
Content-Length: 416
Content-Type: application/json

{
"_href": "/pulp/api/v2/events/notanevent/",
"error": {
"code": "PLP0009",
"data": {
"resources": {
"event_listener": "notanevent"
}
},
"description": "Missing resource(s): event_listener=notanevent",
"sub_errors": []
},
"error_message": "Missing resource(s): event_listener=notanevent",
"exception": null,
"http_request_method": "GET",
"http_status": 404,
"resources": {
"event_listener": "notanevent"
},
"traceback": null
}

This is the same output you'll see from /pulp/api/v2/repositories/notarepository/ or /pulp/api/v2/consumers/notaconsumer/

This is the output from retrieving the schedules for a consumer that doesn't exist:

curl -i -H "Accept: application/json" -X GET -u admin:admin -k 'https://localhost/pulp/api/v2/consumers/notaconsumer/schedules/'
HTTP/1.1 404 Not Found
Date: Thu, 07 Aug 2014 15:43:54 GMT
Server: Apache/2.4.10 (Fedora) OpenSSL/1.0.1e-fips mod_wsgi/3.5 Python/2.7.5
Content-Length: 9
Content-Type: text/html; charset=UTF-8

not found

+ This comment was cloned from Bugzilla #1111297 comment 2 +

#3 Updated by bmbouter almost 3 years ago

  • Status changed from NEW to CLOSED - WONTFIX

#4 Updated by bmbouter almost 3 years ago

  • Severity set to 1. Low

Pulp 2 is approaching maintenance mode, and this Pulp 2 ticket is not being actively worked on. As such, it is being closed as WONTFIX. Pulp 2 is still accepting contributions though, so if you want to contribute a fix for this ticket, please reopen or comment on it. If you don't have permissions to reopen this ticket, or you want to discuss an issue, please reach out via the developer mailing list.

#5 Updated by bmbouter almost 3 years ago

  • Tags Pulp 2 added

#6 Updated by bmbouter over 1 year ago

  • Category deleted (14)

We are removing the 'API' category per open floor discussion June 16, 2020.

Please register to edit this issue

Also available in: Atom PDF