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

feat: consolidate custom error handlers #2258

Open
filmaj opened this issue Sep 15, 2024 · 0 comments
Open

feat: consolidate custom error handlers #2258

filmaj opened this issue Sep 15, 2024 · 0 comments
Labels
docs M-T: Documentation work only enhancement M-T: A feature request for new functionality semver:major TypeScript-specific
Milestone

Comments

@filmaj
Copy link
Contributor

filmaj commented Sep 15, 2024

Today, bolt allows for two different kinds of error handlers to be defined in an app:

Additionally, this distinction is not documented in our main docs about error handling: https://slack.dev/bolt-js/concepts/error-handling - so the two different kinds of error handlers is a semi-secret. However, it is part of the public API.

I suggest consolidating this: all error handlers are extended error handlers, so any defined error handlers have available to them all the arguments of an extended error handler. A 'simple' error handler can choose not to use the extended error handler properties (and only read from the error object itself).

I think it simplifies the code and API surface area.

@filmaj filmaj added enhancement M-T: A feature request for new functionality docs M-T: Documentation work only semver:major TypeScript-specific labels Sep 15, 2024
@filmaj filmaj added this to the 4.0.0 milestone Sep 15, 2024
@filmaj filmaj modified the milestones: 4.0.0, 5.0.0 Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs M-T: Documentation work only enhancement M-T: A feature request for new functionality semver:major TypeScript-specific
Projects
None yet
Development

No branches or pull requests

1 participant