Remove use of deprecated getPossibleErrors (since 1.24)

Change-Id: I2f9892ac2ef1f054ac419a907f2d5e19484d838f