Slack breaking change: @slack/[email protected]
What changed
From the upstream announcement:
Major Changes fc98c8c : Drop Node.js 18 support. The minimum supported Node.js version is now 20. fc98c8c : Redesigned error handling to use proper Error subclasses instead of plain objects with a code property. Migration: Replace if (error.code === ErrorCode.PlatformError) with if (error instanceof WebAPIPlatformError) . All error classes extend a common SlackError base class (which extends Error ), so you can also catch all SDK errors with if (error instanceof SlackError) . New error class hierarchy: SlackError (abstract base) WebAPIPlatformError — Slack API returned ok: false WebAPIRequestError — Network/transport failure (original error in cause ) WebAPIHTTPError — Non-200 HTTP status from Slack WebAPIRateLimitedError — HTTP 429 with retryAfter seconds WebAPIFileUploadInvalidArgumentsError — Invalid file upload arguments WebAPIFileUploadReadFileDataError — Failed to read file data fo […]
Who is affected
Codebases that call the Slack API surface named above.
To find out whether your repo is hit — file and line number, no code leaving your machine:
npx mendapi scan --repo .
How to fix it
mendapi ships a deterministic migration pack for this change (slack-sdk-v8-errors). Preview the patch locally (dry-run is the default; nothing is modified without --apply):
npx mendapi fix --repo . --migration slack-sdk-v8-errors
The pack is idempotent, gold-regression tested, and safe on partially migrated code.
Detected and tracked by mendapi — Dependabot for every API you depend on. Scans run locally; your code never leaves your machine.
Related
- All monitored providers — live change counts for slack and 19 others.
- Migration pack catalog — every deterministic fix mendapi ships.
- Getting started — scan your repo in 30 seconds, no code leaves your machine.
Pre-release. Change data is recorded from upstream provider releases, changelogs and OpenAPI spec diffs; every article links its source.