Remove use of deprecated getPossibleErrors (since 1.24)

Change-Id: I9338bc60551303b7cf023225963a9394adfb857e