Can createPoller report task errors without stopping future runs? #10
-
|
For a polling task that sometimes fails, I need to record the error but keep polling later. Does createPoller support that pattern? |
Beta Was this translation helpful? Give feedback.
Answered by
shnwazdeveloper
May 10, 2026
Replies: 1 comment
-
|
Yes. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
clyxudev
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes.
createPoller(task, { onError })stores the latest failure insnapshot().lastError, emits theerrorevent, and then schedules the next run again. The scheduled loop catches the task failure after notifyingonError, so future runs continue. Useuntil(predicate, { rejectOnError: true })only when a waiting caller should fail on the next poll error.