Closed Bug 1349250 Opened 8 years ago Closed 8 years ago

Requesting /iterations/<id> for a non-existent iteration should return a 404

Categories

(Conduit :: General, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: smacleod, Assigned: smacleod)

References

()

Details

Attachments

(1 file)

No description provided.
Comment on attachment 8849608 [details] commit-index: make iterations/{id} always 404 (bug 1349250). https://reviewboard.mozilla.org/r/122398/#review124518 ::: commitindex/commitindex/api/iterations.py:21 (Diff revision 1) > + # We could not find a matching iteration. > + return problem( > + 404, > + 'Iteration not found', > + 'The requested iteration does not exist', > + type='https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/404') I couldn't decide between this current descriptive url, or the less descriptive spec url: "https://tools.ietf.org/html/rfc7231#section-6.5.4"... The other option is actually creating error pages to describe our specific unique errors, but I think a 404 is pretty self describing.
Comment on attachment 8849608 [details] commit-index: make iterations/{id} always 404 (bug 1349250). https://reviewboard.mozilla.org/r/122398/#review124562 - Started `commitindex` - Opened new terminal, ssh'd into `commitindex` - `http://commitindex:8888/iterations/222` - Results in: ``` { "detail": "The requested iteration does not exist", "status": 404, "title": "Iteration not found", "type": "https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/404" } ``` Code looks good to me!
Attachment #8849608 - Flags: review+
Comment on attachment 8849608 [details] commit-index: make iterations/{id} always 404 (bug 1349250). https://reviewboard.mozilla.org/r/122398/#review124646 Looks great and works as expected. r=dkl
Attachment #8849608 - Flags: review?(dkl) → review+
Pushed by smacleod@mozilla.com: https://hg.mozilla.org/automation/conduit/rev/48982f7f928b commit-index: make iterations/{id} always 404 . r=davidwalsh,dkl
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Assignee: nobody → smacleod
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: