Remove use of deprecated getPossibleErrors (since 1.24)

Change-Id: I1401a832fda82b28fa2a942460b61428ec96d570