def get_object_or_404(queryset, *args, **kwargs):
    """ replacement of rest_framework.generics and django.shrtcuts analogues """
    try:
        return queryset.get(*args, **kwargs)
    except (__HOLE__, TypeError, DoesNotExist):
        raise Http404()
dataset/ETHPy150Open umutbozkurt/django-rest-framework-mongoengine/rest_framework_mongoengine/generics.py/get_object_or_404