fix: propagate api error message#72
Conversation
WalkthroughReturn type of APIDataAmender.amend_conversation_data changed from bool to Optional[str], shifting error signaling to a returned message. Processor updated to consume the optional error message: if present, it logs and marks metrics as ERROR; if None, it proceeds with evaluation. No other public API changes. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Runner as EvaluationRunner
participant Processor as Processor
participant Amender as APIDataAmender
participant API as api_client
Runner->>Processor: process(conversation)
Processor->>Amender: amend_conversation_data(conv_data)
Amender->>API: call external API
alt API success
API-->>Amender: response OK
Amender-->>Processor: None (no error)
Processor->>Processor: proceed with metrics evaluation
else API error/exception
API-->>Amender: error
Amender-->>Processor: "error message"
Processor->>Processor: mark all metrics = ERROR (message)
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🧰 Additional context used🧬 Code graph analysis (2)src/lightspeed_evaluation/pipeline/evaluation/processor.py (2)
src/lightspeed_evaluation/pipeline/evaluation/amender.py (1)
🔇 Additional comments (5)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@VladimirKadlec @tisnik PTAL |
Propagate API error to the output.
Summary by CodeRabbit
Bug Fixes
Refactor