Remove use of deprecated getPossibleErrors (since 1.24)

Change-Id: I8160b9b9ddb82021a16d4def9145a660cfe49bed