def get_object_or_404(queryset, *filter_args, **filter_kwargs):
    """
    Same as Django's standard shortcut, but make sure to also raise 404
    if the filter_kwargs don't match the required types.
    """
    try:
        return _get_object_or_404(queryset, *filter_args, **filter_kwargs)
    except (TypeError, __HOLE__):
        raise Http404
dataset/ETHPy150Open tomchristie/django-rest-framework/rest_framework/generics.py/get_object_or_404