Remove use of deprecated getPossibleErrors (since 1.24)

Change-Id: I5452a4f892162153dfff3cd58c922ad45b8920da