Remove use of deprecated getPossibleErrors (since 1.24)

Change-Id: I782d0ce2ec998f3533cb0b733df4d03a5015fc7e