Skip to main content

Module error_messages

Module error_messages 

Source
Expand description

Canonical error message constructors.

Responsibilities:

  • Provide helper functions for all “task not found” error scenarios
  • Ensure consistent formatting and actionable hints

Does not handle:

  • Error types (use anyhow/thiserror in consuming modules)
  • I18N (messages are English-only)

Invariants/assumptions:

  • All task ID parameters are non-empty trimmed strings
  • Messages include actionable hints where appropriate

Functions§

root_task_not_found
Root task not found (for tree/graph commands).
source_task_not_found
Source task not found (for clone/split operations).
task_no_longer_exists
Task no longer exists (for session recovery scenarios). Used when a task was deleted during execution.
task_not_found
Generic task not found (for simple cases).
task_not_found_batch_failure
Task not found for batch operations (recorded as failure).
task_not_found_for_edit
Task not found for edit operations with file context.
task_not_found_in_done_archive
Task not found in done archive specifically.
task_not_found_in_queue
Task not found in the active queue only.
task_not_found_in_queue_or_done
Task not found in either queue or done archive.
task_not_found_with_include_done_hint
Task not found with hint to use –include-done.
task_not_found_with_operation
Task not found with operation context (for QueueQueryError).