Remove use of deprecated getPossibleErrors (since 1.24)

Change-Id: Iad2f6a58678607ed81c86e9d16c0ba7b66c5d179