Fix exception being thrown on URLs with nonexistent review id

Review Request #3767 — Created Jan. 18, 2013 and submitted — Latest diff uploaded

Information

nh2
Djblets
master

Reviewers

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.