handle spy timeout or expected error