Project

Profile

Help

Issue #3230

closed

Story #3209: As a user, I have Repository Versions

Repository version REST API returns 200 instead of 404

Added by dkliban@redhat.com over 6 years ago. Updated almost 4 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Sprint 31
Quarter:

Description

Need to add a check for existence of repository id.

[vagrant@pulp3 devel]$ http :8000/api/v3/repositories/04fa84f6-f748-4369-aec1-4378b43e1f42/
HTTP/1.0 404 Not Found
Allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS
Content-Length: 23
Content-Type: application/json
Date: Wed, 20 Dec 2017 17:56:02 GMT
Server: WSGIServer/0.2 CPython/3.5.4
Vary: Accept, Cookie
X-Frame-Options: SAMEORIGIN

{
    "detail": "Not found."
}

[vagrant@pulp3 devel]$ http :8000/api/v3/repositories/04fa84f6-f748-4369-aec1-4378b43e1f42/versions/
HTTP/1.0 200 OK
Allow: GET, HEAD, OPTIONS
Content-Length: 42
Content-Type: application/json
Date: Wed, 20 Dec 2017 17:56:06 GMT
Server: WSGIServer/0.2 CPython/3.5.4
Vary: Accept, Cookie
X-Frame-Options: SAMEORIGIN

{
    "next": null,
    "previous": null,
    "results": []
}

Also available in: Atom PDF