Repository navigation
onFailure doesn't fire for crashed runs: what a task failure alert actually covers #5178
virajrakholiya
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
A gap I didn't expect when thinking through alerts for background tasks.
The per-task
onFailurehook (or the globaltasks.onFailure) is the natural place to send an alert:Two details from the docs change what that alert covers:
Also: errors thrown inside
onFailureare ignored (they show in the dashboard), so a broken alert integration fails quietly.So I now read
onFailureas "my code threw, after retries", and look somewhere else for crashes.Question: how are you catching Crashed runs? Dashboard alerts, a webhook, or a scheduled task that checks recent runs by status?
Disclosure: I'm building Relia, a monitoring tool that watches a web app's APIs, errors, database and AI model calls and explains incidents in plain words. Nothing in it is Trigger.dev-specific; this came from reading the lifecycle docs. https://tryrelia.com/r/viraj
All reactions