(domain, instance_xml, error, auth_context)
return FormProcessingResult(xform)
Handle's a hard failure from posting a form to couch.
    :returns: xform error instance with raw xml as attachment
Handle's a hard failure from posting a form to couch.
    :returns: xform error instance with raw xml as attachment
Handle s a hard failure from posting a form to couch . : returns : xform error instance with raw xml as attachment
def _get_submission_error(domain, instance_xml, error, auth_context):
    """
    Handle's a hard failure from posting a form to couch.
    :returns: xform error instance with raw xml as attachment
    """
    try:
        message = str(error)
    except UnicodeDecodeError:
        message = str(str(error), encoding='utf-8')

    xform = FormProcessorInterface(domain).submission_error_form_instance(instance_xml, message)
    xform.auth_context = auth_context
    return FormProcessingResult(xform)
def _get_submission_error ( domain , instance_xml , error , auth_context ) : try : message = str ( error ) except UnicodeDecodeError : message = str ( str ( error ) , encoding = 'utf-8' ) xform = FormProcessorInterface ( domain ) . submission_error_form_instance ( instance_xml , message ) xform . auth_context = auth_context return FormProcessingResult ( xform )