def error_page(<EOL>participant=None,<EOL>error_text=None,<EOL>compensate=True,<EOL>error_type="<STR_LIT:default>",<EOL>request_data="<STR_LIT>",<EOL>):
config = _config()<EOL>if error_text is None:<EOL><INDENT>error_text = """<STR_LIT>"""<EOL><DEDENT>if participant is not None:<EOL><INDENT>hit_id = (participant.hit_id,)<EOL>assignment_id = (participant.assignment_id,)<EOL>worker_id = participant.worker_id<EOL>participant_id = participant.id<EOL><DEDENT>else:<EOL><INDENT>hit_id = request.form.get("<STR_LIT>", "<STR_LIT>")<EOL>assignment_id = request.form.get("<STR_LIT>", "<STR_LIT>")<EOL>worker_id = request.form.get("<STR_LIT>", "<STR_LIT>")<EOL>participant_id = request.form.get("<STR_LIT>", None)<EOL><DEDENT>if participant_id:<EOL><INDENT>try:<EOL><INDENT>participant_id = int(participant_id)<EOL><DEDENT>except (ValueError, TypeError):<EOL><INDENT>participant_id = None<EOL><DEDENT><DEDENT>return make_response(<EOL>render_template(<EOL>"<STR_LIT>",<EOL>error_text=error_text,<EOL>compensate=compensate,<EOL>contact_address=config.get("<STR_LIT>"),<EOL>error_type=error_type,<EOL>hit_id=hit_id,<EOL>assignment_id=assignment_id,<EOL>worker_id=worker_id,<EOL>request_data=request_data,<EOL>participant_id=participant_id,<EOL>),<EOL><NUM_LIT>,<EOL>)<EOL>
Render HTML for error page.