Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log a warning if the exception in case add thread flow is users not found #4484

Merged
merged 6 commits into from
Mar 6, 2024

Conversation

wssheldon
Copy link
Contributor

@wssheldon wssheldon commented Mar 5, 2024

Users are automatically engaged in Slack Case threads frequently who did not exist in the workspace. We can log this as a warning and move on.

Tested this locally by creating a case via an ingested Signal:

...
WARNING:Unable to resolve Slack participant: The request to the Slack API failed. (url: https://www.slack.com/api/users.lookupByEmail)
The server responded with: {'ok': False, 'error': 'users_not_found'}:/Users/wshel/Projects/dispatch/src/dispatch/plugins/dispatch_slack/service.py:emails_to_user_ids:72
DEBUG:function.elapsed.time.dispatch.plugins.dispatch_slack.plugin.SlackConversationPlugin.add_to_thread: 0.2627900000079535:/Users/wshel/Projects/dispatch/src/dispatch/decorators.py:wrapper:139

You can see above we now log a WARNING when the user cannot be resolved in the add_to_thread code flow.

@wssheldon wssheldon added the bug Something isn't working label Mar 5, 2024
@wssheldon wssheldon requested a review from whitdog47 March 5, 2024 23:32
@whitdog47 whitdog47 self-requested a review March 6, 2024 00:26
@wssheldon wssheldon merged commit da99f59 into master Mar 6, 2024
8 checks passed
@wssheldon wssheldon deleted the logs/unknown-user-case-flow branch March 6, 2024 00:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants