def METHOD_NAME(app_request, mocked_session_update):
    response = bad_request(app_request, Exception())
    assert response.status_code == 400
    assert "origin" in mocked_session_update.call_args.kwargs
    assert mocked_session_update.call_args.kwargs["origin"] == reverse(ROUTE_INDEX)