def METHOD_NAME(
        mock_mgr, caplog, error, stop_on_index):
    mock_mgr.setup_stubs(error, stop_on_index, mock_mgr.instance_data.stubber)
    with pytest.raises(ClientError) as exc_info:
        mock_mgr.instance_data.scenario.create_instance(*mock_mgr.scenario_args)
    assert exc_info.value.response['Error']['Code'] == error
    assert error in caplog.text