Skip to content

FOUR-25299 | Improve Error Handling for Missing API Token #8369

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

Open
wants to merge 4 commits into
base: epic/FOUR-22519
Choose a base branch
from

Conversation

mcraeteisha
Copy link
Contributor

@mcraeteisha mcraeteisha commented Jul 14, 2025

Feature

Ticket: FOUR-25299

This pull request adds improved error handling for a missing Slack API token in SlackNotificationService.php. This enhancement ensures that the Slack notification service fails gracefully and informs developers when a critical configuration (the Slack API token) is missing.

Key Changes:

  • Added a check in SlackNotificationService.php to verify the presence of $slackApiToken.
  • An error is now thrown if $slackApiToken is not set, preventing silent failures and providing clearer feedback.
  • In edit.blade.php, save the user's profile changes if there is no error.

How to Test

  1. Go to branch observation/FOUR-25299 in connector-slack and processmaker.
  2. If it exists, remove the SLACK_OAUTH_ACCESS_TOKEN value from your database.
  3. Navigate to the Connected Accounts tab of the "Edit Profile" page.
    • Toggle the Slack Connector to ON.
  4. You should receive an error message that Slack API token is not set. Please configure the SLACK_OAUTH_ACCESS_TOKEN environment variable.

ci:connector-slack:observation/FOUR-24916
ci:deploy

Code Review Checklist

  • I have pulled this code locally and tested it on my instance, along with any associated packages.
  • This code adheres to ProcessMaker Coding Guidelines.
  • This code includes a unit test or an E2E test that tests its functionality, or is covered by an existing test.
  • This solution fixes the bug reported in the original ticket.
  • This solution does not alter the expected output of a component in a way that would break existing Processes.
  • This solution does not implement any breaking changes that would invalidate documentation or cause existing Processes to fail.
  • This solution has been tested with enterprise packages that rely on its functionality and does not introduce bugs in those packages.
  • This code does not duplicate functionality that already exists in the framework or in ProcessMaker.
  • This ticket conforms to the PRD associated with this part of ProcessMaker.

ci:deploy

@vladyrichter
Copy link

QA server K8S was successfully deployed https://ci-c4b98ffcc4.engk8s.processmaker.net

1 similar comment
@vladyrichter
Copy link

QA server K8S was successfully deployed https://ci-c4b98ffcc4.engk8s.processmaker.net

@vladyrichter
Copy link

QA server K8S was successfully deployed https://ci-c4b98ffcc4.engk8s.processmaker.net

@vladyrichter
Copy link

QA server K8S was successfully deployed https://ci-c4b98ffcc4.engk8s.processmaker.net

1 similar comment
@vladyrichter
Copy link

QA server K8S was successfully deployed https://ci-c4b98ffcc4.engk8s.processmaker.net

Copy link

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

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.

3 participants