human
Complete the below
def common_exceptions_400(func):

    ''''Catches common exceptions and renders matching 400 errors.
    (decorator without arguments)'
    '''

=====
What is a the Python program you requested?
assistant
#Here is the Python program you requested.
    def wrapped(request, *args, **kwargs):
        use_json = (request.is_ajax() or request.META.get('HTTP_ACCEPT', '').startswith('application/json'))
        try:
            return func(request, *args, **kwargs)
        except User.DoesNotExist:
            message = _('User    does    not    exist.')
        except (AlreadyRunningError, QueueConnectionError) as err:
            message = str(err)
        if use_json:
            return JsonResponseBadRequest(message)
        else:
            return HttpResponseBadRequest(message)
    return wrapped