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
Open
Conversation
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>
|
|
Thanks for the contribution! Before we can merge this, we need @zk-khan to sign the Salesforce Inc. Contributor License Agreement. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two commits:
docs/english/migration/migration-v4.md— the "after" snippet importsdefaultProcessEventHandler, which@slack/boltdoes not export; the named export (src/index.ts) isdefaultProcessEventErrorHandler, as the surrounding prose and the "before" snippet already say. The import as written fails to compile.docs/japanese/concepts/authenticating-oauth.md— the snippets callmyDB.delete/set/get, but the store these snippets declare and use everywhere else isdatabase(matching the English guide), so the code throwsReferenceErrorif run; additionallyverifyStateParamreadrandomState, which is scoped to the siblinggenerateStateParamcallback — the correct key is its ownstateparameter (the English counterpart usesdatabase.get(state)).Verification:
npm testpasses locally on Node 22 (build + biome check overdocs src test examples+ tsd + mocha: 477 passing; macOS arm64).Prepared with AI assistance (Claude); the export was grep-verified against
src/index.tsand the variable scoping checked against the English guide.