Remove use of deprecated getPossibleErrors (since 1.24)

Change-Id: If509f48301bdabece587792a4f5815eb7f6edc90