Remove use of deprecated getPossibleErrors (since 1.24)

Change-Id: I0603830c74b0a83a74933547c9d778c03e314cf1