Improves error handling, logging, and messaging in Slack plugin #5288
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes several updates to the
dispatch_slack
plugin to improve the handling of case messages, specifically around signal analysis and action buttons. The most important changes include updating function arguments to usecase
objects instead ofcase_id
, enhancing the GenAI signal analysis message generation, and improving error handling and logging.Updates to function arguments and imports:
case_id
tocase
to streamline data handling and improve code readability increate_signal_message
,create_action_buttons_message
, andcreate_genai_signal_analysis_message
functions. (src/dispatch/plugins/dispatch_slack/case/messages.py
) [1] [2] [3]case_service
import to facilitate fetching case details. (src/dispatch/plugins/dispatch_slack/case/messages.py
)Enhancements to GenAI signal analysis:
src/dispatch/plugins/dispatch_slack/case/messages.py
) [1] [2] [3]src/dispatch/plugins/dispatch_slack/case/messages.py
)src/dispatch/plugins/dispatch_slack/case/messages.py
)Error handling and logging improvements:
src/dispatch/plugins/dispatch_slack/case/messages.py
) [1] [2]create_threaded
function to handle potential errors when generating GenAI signal analysis messages and ensure the correct timestamp is used. (src/dispatch/plugins/dispatch_slack/plugin.py
) [1] [2] [3]