Fix exception being thrown on URLs with nonexistent review id
Review Request #3767 — Created Jan. 18, 2013 and submitted
Fix exception being thrown on URLs with nonexistent review id URLs like /api/review-requests/<id>/screenshots, where <id> is nonexistent, until now threw an exception instead of translating to a proper 404. This change catches the possible ObjectDoesNotExist of get_queryset() in WebAPIResource.get_list. Fixes #2551.
webapi.tests.ScreenshotResourceTests.test_get_screenshots_with_invalid_review_request_id in the corresponding change for revieboard tests this behavior.
Description | From | Last Updated |
---|---|---|
We like these alphabetically ordered- so this should be before django.core.urlresolvers. |
mike_conley |
NH
- Bugs:
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: djblets/webapi/resources.py Ignored Files:
NH
- Change Summary:
-
Improve description
- Summary:
-
WebAPIResource.get_list: Handle get_queryset() exception.Fix exception being thrown on URLs with nonexistent review id
- Description:
-
~ WebAPIResource.get_list: Handle get_queryset() exception.
~ Fix exception being thrown on URLs with nonexistent review id
~ It can throw a ObjectDoesNotExist that now translates to a 404.
~ Fixes #2551. ~ URLs like /api/review-requests/<id>/screenshots, where <id> is nonexistent, until now threw an exception instead of translating to a proper 404.
~ + This change catches the possible ObjectDoesNotExist of get_queryset() in WebAPIResource.get_list.
+ + Fixes #2551.