Skip to content

How to handle errors with invalid signing secret? #2143

@dophsquare

Description

@dophsquare

Hello,

I'm trying to see if we can catch the error with invalid signing secret. We want to catch this error to send it through our alert system. Currently, the error only shows in CloudWatch log. It's hard to know if there's an error with the app.

https://github.com/slackapi/bolt-js/blob/main/src/receivers/AwsLambdaReceiver.ts#L174

Can we send this error to app.error?

@slack/bolt version

3.8.1

Your App and Receiver Configuration

const awsLambdaReceiver = new AwsLambdaReceiver({
  signingSecret: process.env.FEEDBACK_SIGNING_SECRET,
})

const app = new App({
  token: process.env.SLACK_EMPLOYEE_FEEDBACK_TOKEN,
  signingSecret: process.env.FEEDBACK_SIGNING_SECRET,
  receiver: awsLambdaReceiver,
  logLevel: LogLevel.DEBUG,
})

Node.js runtime version

v20.9.0

Requirements

For general questions/issues about Slack API platform or its server-side, could you submit questions at https://my.slack.com/help/requests/new instead. 🙇

Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementM-T: A feature request for new functionalitygood first issueGood for newcomersquestionM-T: User needs support to use the projectsemver:minor

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions