Remove use of deprecated getPossibleErrors (since 1.24)

Change-Id: I30d3ccc834dcc7eaa9534cfb7c5c6047752f147b