Remove use of deprecated getPossibleErrors (since 1.24)

Change-Id: I776c9c58bf35da02e46c845906988e4dc4bab8c4