Skip to content
This repository was archived by the owner on Sep 3, 2025. It is now read-only.

Conversation

@whitdog47
Copy link
Contributor

@whitdog47 whitdog47 commented Jul 1, 2025

Adds logging for errors encountered during GenAI analysis and preserves existing fallback behavior.

@whitdog47 whitdog47 requested review from aaronherman and Copilot July 1, 2025 20:30
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds logging for errors encountered during GenAI analysis and preserves existing fallback behavior.

  • Captures the GenAIException as e instead of a bare except.
  • Logs a warning with the case ID and error message when GenAI analysis fails.
  • Returns the original fallback summary and metadata blocks unchanged.
Comments suppressed due to low confidence (1)

src/dispatch/plugins/dispatch_slack/case/messages.py:391

  • There’s no existing test for the GenAIException path. Add a unit test that mocks ai_service.generate_case_signal_summary to raise GenAIException and asserts the warning log is emitted and the fallback summary is returned.
    except GenAIException as e:

@whitdog47 whitdog47 self-assigned this Jul 1, 2025
@whitdog47 whitdog47 added the bug Something isn't working label Jul 1, 2025
@whitdog47 whitdog47 requested a review from aliciamatsumoto July 1, 2025 20:32
@whitdog47 whitdog47 merged commit 7fd3aa5 into main Jul 1, 2025
10 of 11 checks passed
@whitdog47 whitdog47 deleted the fix/output-genai-error-to-log branch July 1, 2025 20:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants