Custom exception types for workflow failures.
In @src/aiq_agent/agents/deep_researcher/agent.py
Lines 215 and 234 raise ValueError for runtime workflow failures (no markdown output, no valid citations). These are not programming errors but legitimate failure modes of the LLM-driven workflow. Custom exception types (e.g., WorkflowOutputError, CitationValidationError) would:
- Allow callers to distinguish workflow failures from actual programming errors
- Enable more precise error handling and retry logic at higher layers
- Provide clearer semantics than generic
ValueError
Note that line 243 already uses the custom EmptySourceRegistryError for similar conditions.
Also applies to: 233-234
Originally posted by @coderabbitai[bot] in #267 (comment)
Custom exception types for workflow failures.
In
@src/aiq_agent/agents/deep_researcher/agent.pyLines 215 and 234 raise
ValueErrorfor runtime workflow failures (no markdown output, no valid citations). These are not programming errors but legitimate failure modes of the LLM-driven workflow. Custom exception types (e.g.,WorkflowOutputError,CitationValidationError) would:ValueErrorNote that line 243 already uses the custom
EmptySourceRegistryErrorfor similar conditions.Also applies to: 233-234
Originally posted by @coderabbitai[bot] in #267 (comment)