About the trigger it will be easier to talk about it here.

As you can see the choice of re-launch a run or stop is made before the trigger. But the trigger was already in that order, after the stop. As de delayedRun is async, unless a very short delay the event will be received before the next poll, but I can ensure that. So I think the event should be triggered before the call to `delayedRun`.

But, for the `stop` cause the event should be triggered after. In case some callback are called for this event, the poller will still be in a state of running instead of error / stop.

I propose this solution:

```javascript
    if (poller.options.ignoreError) {
        poller.trigger('error', model, resp);
        delayedRun(poller);
    } else {
        poller.stop({silent: true});
        poller.trigger('error', model, resp);
}
```