def handle_error(code):
    # TODO: Remove circular import
    from website.routes import OsfWebRenderer
    json_renderer = JSONRenderer()
    web_renderer = OsfWebRenderer('', render_mako_string)

    error = HTTPError(code)
    renderer = json_renderer if is_json_request() else web_renderer
    return make_response(renderer.handle_error(error))
Manages admin users
dataset/ETHPy150Open CenterForOpenScience/osf.io/framework/transactions/utils.py/handle_error--crossover with--dataset/ETHPy150Open mrgambal/vulyk/vulyk/control.py/admin