Remove use of deprecated getPossibleErrors (since 1.24)

Change-Id: I8344ee111fc34782499abb04c08c3d4b75ab825e