Remove use of deprecated getPossibleErrors (since 1.24)

Change-Id: Id58350168ed0a3fe9a41ef990a4771bb5311829e