Skip to content

Conversation

@zubricks
Copy link
Member

@zubricks zubricks commented Jan 6, 2026

Updates documentation on how to properly fail a task. Fixes #12050

Includes:

  • Two approaches to failing tasks (throw vs return failed state)
  • Examples with and without custom error messages
  • Guidance on when to use each approach
  • How to access failure information from job logs

@zubricks zubricks requested a review from AlessioGr January 6, 2026 15:00
@zubricks zubricks added the area: docs Improvements or additions to documentation label Jan 6, 2026
@zubricks zubricks changed the title Docs/task failure docs docs: task failure docs Jan 6, 2026
@AlessioGr AlessioGr merged commit 81df3d6 into main Jan 7, 2026
13 checks passed
@AlessioGr AlessioGr deleted the docs/task-failure-docs branch January 7, 2026 21:11
teastudiopl pushed a commit to teastudiopl/payload that referenced this pull request Jan 8, 2026
Updates documentation on how to properly fail a task. Fixes
payloadcms#12050

Includes:

- Two approaches to failing tasks (throw vs return failed state)
- Examples with and without custom error messages
- Guidance on when to use each approach
- How to access failure information from job logs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: docs Improvements or additions to documentation created-by: Payload team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

It should be documented how to fail a task

3 participants