Skip to content

Properly handle list of approvers even if user doesn't exists anymore in Slack#139

Open
IvanVojtko wants to merge 1 commit intofivexl:mainfrom
IvanVojtko:main
Open

Properly handle list of approvers even if user doesn't exists anymore in Slack#139
IvanVojtko wants to merge 1 commit intofivexl:mainfrom
IvanVojtko:main

Conversation

@IvanVojtko
Copy link

@IvanVojtko IvanVojtko commented Jan 15, 2026

This is not properly handled for group request access. It's correctly handled if we use find_approvers_in_slack instead of directly getting list from get_user_by_email which throws an exception when user is not found. This PR fixes #138


Note

Improves resilience of approver resolution for group access requests.

  • Replaces direct get_user_by_email usage with slack_helpers.find_approvers_in_slack in src/group.py under DecisionReason.RequiresApproval to avoid exceptions when users no longer exist in Slack
  • Adds explicit handling when no approvers are found: send error text/DM and set bad_result_emoji
  • If some approver emails are missing, appends a note listing the missing emails while proceeding with mentions of found approvers and waiting_result_emoji
  • Adjusts channel and DM texts accordingly while preserving existing flow for other decision paths

Written by Cursor Bugbot for commit 3756f68. This will update automatically on new commits. Configure here.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

This PR is being reviewed by Cursor Bugbot

Details

Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

@Andrey9kin Andrey9kin self-assigned this Feb 3, 2026
@Andrey9kin
Copy link
Member

@IvanVojtko thanks for the PR, will look into it tomorrow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Elevator request for group elevation fails when approver doesn't exists in Slack

2 participants