Remove use of deprecated getPossibleErrors (since 1.24)

Change-Id: Icff847863af66570e4325d615b5720ae4be6fad4