(request, message, metric_tags,
        domain, app_id, user_id, authenticated, meta=None, status=400,
        notify=True)
return response
Notify exception, datadog count, record metrics, construct response

    :param status: HTTP status code (default: 400).
    :returns: HTTP response object
Notify exception, datadog count, record metrics, construct response
Notify exception datadog count record metrics construct response
def _submission_error(request, message, metric_tags,
        domain, app_id, user_id, authenticated, meta=None, status=400,
        notify=True):
    """Notify exception, datadog count, record metrics, construct response

    :param status: HTTP status code (default: 400).
    :returns: HTTP response object
    """
    details = [
        "domain:{}".format(domain),
        "authenticated:{}".format(authenticated),
    ]
    if notify:
        details.extend([
            "user_id:{}".format(user_id),
            "form_meta:{}".format(meta or {}),
            "app_id:{}".format(app_id),
        ])
        notify_exception(request, message, details)
    response = HttpResponseBadRequest(
        message, status=status, content_type="text/plain")
    _record_metrics(metric_tags, 'error', response)
    return response
def _submission_error ( request , message , metric_tags , domain , app_id , user_id , authenticated , meta = None , status = 400 , notify = True ) : details = [ "domain:{}" . format ( domain ) , "authenticated:{}" . format ( authenticated ) , ] if notify : details . extend ( [ "user_id:{}" . format ( user_id ) , "form_meta:{}" . format ( meta or { } ) , "app_id:{}" . format ( app_id ) , ] ) notify_exception ( request , message , details ) response = HttpResponseBadRequest ( message , status = status , content_type = "text/plain" ) _record_metrics ( metric_tags , 'error' , response ) return response