Skip to content

Enable developers to customize the way to handle unmatched requests #719

Description

@seratch

Currently, there is no way to customize the behavior of App when an incoming request does not match with any listeners in the app. To improve this, we can extract these lines of code as a default behavior and enable developers to override the function in some way.

As we already have methods like oauth*Error, I'm thinking to name the new method as unhandledRequestError or something like that I went with unmatchedRequestHandler in AppConfig

Unlike other Bolt frameworks (JS / Python), Bolt for Java relays runtime exceptions to the external layer like Bolt adapters and its runtime. If a developer would like to handle the unmatched patterns in a single error handler, the recommended way is to throw an exception in the unhandledRequestError (the name is work in progress) method. I went with unmatchedRequestHandler in AppConfig

See also:

Category (place an x in each of the [ ])

  • bolt (Bolt for Java)
  • bolt-{sub modules} (Bolt for Java - optional modules)
  • slack-api-client (Slack API Clients)
  • slack-api-model (Slack API Data Models)
  • slack-api-*-kotlin-extension (Kotlin Extensions for Slack API Clients)
  • slack-app-backend (The primitive layer of Bolt for Java)

Activity

  1. self-assigned this
    on Mar 29, 2021
  2. added this to the 1.8.0 milestone on Mar 29, 2021
  3. seratch commented on May 6, 2021

    @seratch
    ContributorAuthor

    In this improvement, we can add something similar to slackapi/bolt-python#323 too.

  4. added a commit that references this issue on May 10, 2021
    3e0f899
  5. added a commit that references this issue on May 10, 2021
    416ab04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions