Remove use of deprecated getPossibleErrors (since 1.24)

Change-Id: If43d20687b5aaf78880c7d91e7487da5cb5f7e17