Budibase/budibase · error · HTTPError

Failed to create Slack app

Error message

Failed to create Slack app

What it means

This error is thrown by createSlackAppFromManifest when the HTTP response from Slack's app manifest creation endpoint has a non-ok status. It is a transport/HTTP-level failure distinct from the API-level ok:false handling done by assertSlackOk, and preserves Slack's HTTP status code. It indicates the request to create the Slack app never produced a parseable successful response.

Source

Thrown at packages/server/src/sdk/workspace/ai/deployments/slack.ts:212

  configToken,
  manifest,
}: {
  configToken: string
  manifest: ReturnType<typeof buildSlackManifest>
}) => {
  const response = await fetch(`${SLACK_API_BASE}/apps.manifest.create`, {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
      Authorization: `Bearer ${configToken}`,
    },
    body: JSON.stringify({
      manifest: JSON.stringify(manifest),
    }),
  })
  const payload = (await response.json()) as SlackManifestCreateResponse
  if (!response.ok) {
    throw new HTTPError("Failed to create Slack app", response.status)
  }
  return assertSlackOk(payload, "Failed to create Slack app")
}

export const exchangeSlackOAuthCode = async ({
  code,
  clientId,
  clientSecret,
  redirectUri,
}: {
  code: string
  clientId: string
  clientSecret: string
  redirectUri: string
}) => {
  const response = await fetch(`${SLACK_API_BASE}/oauth.v2.access`, {
    method: "POST",
    headers: {

View on GitHub (pinned to a81a902e9a)

Solutions

  1. Check the HTTP status (included in the error) - 401/403 means refresh the Slack config token; 429 means back off and retry.
  2. Verify the Slack API status page / retry later if the status is 5xx (Slack outage).
  3. Confirm the outbound network path allows HTTPS to api.slack.com from the Budibase server/worker.
  4. Re-obtain the config token via the Slack setup flow and retry the manifest creation.

Example fix

// before - one-shot call with no handling
await createSlackAppFromManifest({ configToken, manifest })
// after - handle status-specific recovery
try {
  await createSlackAppFromManifest({ configToken, manifest })
} catch (e) {
  if (String(e.status) === "429") await sleep(30000) // then retry
  else throw e
}
Defensive patterns

Strategy: retry

Validate before calling

const configToken = process.env.SLACK_CONFIG_TOKEN
if (!configToken) throw new Error("SLACK_CONFIG_TOKEN must be set before creating a Slack app")

Try / catch

try {
  await createSlackAppFromManifest({ configToken, manifest })
} catch (e) {
  if (e instanceof HTTPError && e.status === 429) {
    await sleep(30000)
    return createSlackAppFromManifest({ configToken, manifest }) // single retry
  }
  if (e instanceof HTTPError && e.status === 401) {
    // rotate/refresh the config token before retrying
  }
  throw e
}

Prevention

When it happens

Trigger: POSTing a manifest to Slack's api.slack.com app-manifest create endpoint and receiving 4xx/5xx - e.g. 401/403 from an invalid config token header, 429 rate limit, 5xx Slack outage, or a network/proxy returning a non-2xx status.

Common situations: Expired/invalid Slack config token used as bearer auth; Slack API incident; corporate proxy intercepting the call; malformed JSON body causing a 400 before Slack parses the manifest.

Related errors


AI-assisted analysis of Budibase/budibase@a81a902e9a (2026-08-29). Data as JSON: /api/errors/966aa204f644750d. Report an issue: GitHub.