Skip to content

docs: fix non-existent import in v4 migration guide and undefined variables in JA OAuth snippets#3027

Open
ZayanKhan-12 wants to merge 2 commits into
slackapi:mainfrom
ZayanKhan-12:docs/fix-migration-and-oauth-snippets
Open

docs: fix non-existent import in v4 migration guide and undefined variables in JA OAuth snippets#3027
ZayanKhan-12 wants to merge 2 commits into
slackapi:mainfrom
ZayanKhan-12:docs/fix-migration-and-oauth-snippets

Conversation

@ZayanKhan-12

Copy link
Copy Markdown

Two commits:

  1. docs/english/migration/migration-v4.md — the "after" snippet imports defaultProcessEventHandler, which @slack/bolt does not export; the named export (src/index.ts) is defaultProcessEventErrorHandler, as the surrounding prose and the "before" snippet already say. The import as written fails to compile.
  2. docs/japanese/concepts/authenticating-oauth.md — the snippets call myDB.delete/set/get, but the store these snippets declare and use everywhere else is database (matching the English guide), so the code throws ReferenceError if run; additionally verifyStateParam read randomState, which is scoped to the sibling generateStateParam callback — the correct key is its own state parameter (the English counterpart uses database.get(state)).

Verification: npm test passes locally on Node 22 (build + biome check over docs src test examples + tsd + mocha: 477 passing; macOS arm64).

Prepared with AI assistance (Claude); the export was grep-verified against src/index.ts and the variable scoping checked against the English guide.

zk-khan and others added 2 commits July 26, 2026 20:04
The snippet imported defaultProcessEventHandler, which @slack/bolt does
not export; the export (src/index.ts) is
defaultProcessEventErrorHandler, as the surrounding prose and the
before snippet already say.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The Japanese OAuth guide's snippets call myDB, but the store these
snippets declare and use everywhere else is 'database' (matching the
English guide) - and verifyStateParam read the out-of-scope randomState
instead of its own 'state' parameter (the English counterpart uses
database.get(state)).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@ZayanKhan-12
ZayanKhan-12 requested a review from a team as a code owner July 27, 2026 00:05
@changeset-bot

changeset-bot Bot commented Jul 27, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: a20e4e2

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@salesforce-cla

Copy link
Copy Markdown

Thanks for the contribution! Before we can merge this, we need @zk-khan to sign the Salesforce Inc. Contributor License Agreement.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants