From 59dfe585958b98ccced0f0e625db96974f8726a4 Mon Sep 17 00:00:00 2001 From: Michael Brooks Date: Fri, 16 Oct 2026 15:17:28 -0600 Subject: [PATCH] fix: explain the restricted_scopes error returned when installing an app The apps.developerInstall method returns restricted_scopes when the installer can't grant a requested scope, such as admin and audit scopes or the Slack Connect bot scopes. Add a message and remediation so the error says what happened and how to resolve it. --- internal/slackerror/errors.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/internal/slackerror/errors.go b/internal/slackerror/errors.go index 98e4ab1b..6549f0fd 100644 --- a/internal/slackerror/errors.go +++ b/internal/slackerror/errors.go @@ -227,6 +227,7 @@ const ( ErrRatelimited = "ratelimited" ErrRequestIDOrAppIDIsRequired = "request_id_or_app_id_is_required" ErrRestrictedPlanLevel = "restricted_plan_level" + ErrRestrictedScopes = "restricted_scopes" ErrRuntimeNotFound = "runtime_not_found" ErrRuntimeNotSupported = "runtime_not_supported" ErrSDKConfigLoad = "sdk_config_load_error" @@ -1401,6 +1402,12 @@ Otherwise start your app for local development with: %s`, Message: "Your Slack plan does not have access to the requested feature", }, + ErrRestrictedScopes: { + Code: ErrRestrictedScopes, + Message: "You don't have permission to install an app that requests one or more of its scopes", + Remediation: "Some scopes can only be granted by a workspace admin or owner, such as admin and audit scopes or the Slack Connect bot scopes `conversations.connect:manage` and `conversations.connect:write`.\nAsk a workspace admin or owner to install the app, or remove the restricted scopes from the app manifest.", + }, + ErrRuntimeNotFound: { Code: ErrRuntimeNotFound, Message: "The hook runtime executable was not found",