Fix specs to work with APIError signature change

Change-Id: Ifaeb00626ed84e8a1be816b5cab1a3021dc74938