Remove use of deprecated getPossibleErrors (since 1.24)

Change-Id: I788a82ddbb619e3d08659ac5560730d7fb334609