Remove use of deprecated getPossibleErrors (since 1.24)

Change-Id: I6dd43deb9cf3117c0044d469b927d5b05c6acaed