Remove use of deprecated getPossibleErrors (since 1.24)

Change-Id: I9ac21ba2446eb9311a0f593f71409754052278a2