def METHOD_NAME(task: UserTask, error_needle: str):
    assert task.status == TaskStatus.FAILED
    assert len(task.errors) == 1
    [error] = task.errors
    assert error_needle in error.lower()
    assert task.user.room is None