Slack @slack/[email protected] breaking change: Slack SDK v8 error-handling migration (ErrorCode checks -> instanceof)
What changed
From the upstream announcement:
Major Changes fc98c8c : Drop Node.js 18 support. The minimum supported Node.js version is now 20. fc98c8c : Restructured error classes to use proper Error subclasses extending a new SlackWebhookError base class. Breaking changes to IncomingWebhookHTTPError : The original property has been removed. HTTP response details are now direct properties: statusCode: number statusMessage: string body: string Migrate from error.original.response.status to error.statusCode , error.original.response.data to error.body , etc. Breaking changes to IncomingWebhookRequestError : The original property is now a standard Error (previously it was an AxiosError ). The original error is also available via the standard cause property. Removed factory functions (use new with the corresponding class instead): requestErrorWithOriginal() → new IncomingWebhookRequestError(original) httpErrorWithOriginal() → new Incom […]
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 sync # the one network call: fetch the change feed npx mendapi scan --repo . # local scan, nothing leaves your machine
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
- slack breaking-change guide — every tracked slack entry on one page, with fixability verdicts.
- 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.
Change data is recorded from upstream provider releases, changelogs and OpenAPI spec diffs; every article names its source.