Filter a project's runs by status to find the failed ones, then open one to read its error.
Before you start
You need a run that failed. Follow Write a task with this task instead, then run it once with {} as its payload:
tasks/check-stock.ts
export default { name: "check-stock", description: "Check a product's stock.", schedulable: true, async run() { throw new Error("The stock service did not answer."); },};Find the run that failed
- Sign in to the CLI.
- Set
PROJECTto your project's ID (Find your IDs):export PROJECT=<id>. - List the runs that failed. You should now see only runs with
"status": "failed", each with itserror:Shellnpx veryfront project runs project-list --project-reference $PROJECT --query '{"status":["failed"]}'
Try it in a sandbox
Add a task that fails
Run it
Set PROJECT
Check it