Remove use of deprecated getPossibleErrors (since 1.24)

Change-Id: I0518297ac90946b427749db9bfa697d3f43c7c1c