change to `handleFailedAPI`.