...
raise self.model.DoesNotExist(...)
...
{"message": "record matching identifier A and identifier B not found in database"}
MODELNAME.objects.get(modelfieldname1='foo',modelfieldname2='bar')
MODELNAME.objects.filter(modelfieldname1='foo',modelfieldname2='bar')
raise DoesNotExist...
The difference between .filter() and .get() is definitely 'by-design'.
When you filter through a list of objects, you could end up with zero,
one, or many objects returned.
When you call .get(), you are basically saying "I want to get exactly
*one* record". If the record is not found, it is considered an error.
One additional difference is that .filter() returns a list of zero or
more objects whereas .get() returns the object you requested or it
throws an error.