﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
21619	SingleObjectMixin raises ObjectDoesNotExist, rather than a more specific subclass	Keryn Knight <django@…>	pjrharley	"When calling `get_object` for something which inherits from SingleObjectMixin, the exception caught is [https://github.com/django/django/blob/36ded01527b690b5df0574492af9cfcc2ea3d1dc/django/views/generic/detail.py#L53 ObjectDoesNotExist], when as far as I can tell, based on the `Http404` [https://github.com/django/django/blob/36ded01527b690b5df0574492af9cfcc2ea3d1dc/django/views/generic/detail.py#L55 raised], the more specific form of `queryset.model.DoesNotExist` could be used instead.

I can't see any docs or comments as to a historic (or current) reason it may be catching the generic version (perhaps there are scenarios where the Model's `DoesNotExist` is not available yet?), and there are probably no implications by casting a wider net than necessary, but I'm opening the ticket anyway in case as a possible cleanup worth doing."	Cleanup/optimization	closed	Generic views	dev	Normal	fixed		pjrharley	Accepted	1	0	0	0	0	0
