Move this to the catch block, and add a explicit `fail` after calling the api method.