def error(code, message, template):
    if json_requested():
        return json_error(code, message)
    else:
        return render_template(template, message=message), code
A generic error handler
dataset/ETHPy150Open rehandalal/buchner/buchner/project-template/PROJECTMODULE/errors.py/error