Remove use of deprecated getPossibleErrors (since 1.24)

Change-Id: Ic3665f712fc7cf93dc729293fd1664df8131df18