{"record":{"id":"c3a7c97f74d2bab8","repo":"Budibase/budibase","slug":"slack-app-creation-response-was-incomplete","errorCode":null,"errorMessage":"Slack app creation response was incomplete","messagePattern":"Slack app creation response was incomplete","errorType":"http","errorClass":"HTTPError","httpStatus":400,"severity":"error","filePath":"packages/server/src/api/controllers/ai/agents.ts","lineNumber":531,"sourceCode":"  })\n  const created = await sdk.ai.deployments.slack.createSlackAppFromManifest({\n    configToken: await sdk.ai.slackAppConfig.fetchConfigToken(),\n    manifest,\n  })\n\n  const clientId = created.credentials?.client_id?.trim()\n  const clientSecret = created.credentials?.client_secret?.trim()\n  const signingSecret = created.credentials?.signing_secret?.trim()\n  const appId = created.app_id?.trim()\n  const oauthAuthorizeUrl = created.oauth_authorize_url?.trim()\n  if (\n    !clientId ||\n    !clientSecret ||\n    !signingSecret ||\n    !appId ||\n    !oauthAuthorizeUrl\n  ) {\n    throw new HTTPError(\"Slack app creation response was incomplete\", 400)\n  }\n\n  const state = utils.newid()\n  await cache.store(\n    getSlackOAuthStateCacheKey(state),\n    {\n      agentId,\n      workspaceId,\n    } satisfies SlackOAuthState,\n    SLACK_OAUTH_STATE_TTL_SECONDS,\n    { useTenancy: false }\n  )\n\n  await sdk.ai.agents.update({\n    ...agent,\n    slackIntegration: {\n      ...agent.slackIntegration,\n      appId,","sourceCodeStart":513,"sourceCodeEnd":549,"githubUrl":"https://github.com/Budibase/budibase/blob/a81a902e9a8fe55b467d106765f6638f12e35c49/packages/server/src/api/controllers/ai/agents.ts#L513-L549","documentation":"After provisioning the Slack app for the agent, the code validates the response fields (clientId, clientSecret, signingSecret, appId, oauthAuthorizeUrl). If any of these are missing or empty, it throws this 400 HTTPError because the OAuth flow cannot proceed with an incomplete Slack app manifest.","triggerScenarios":"The Slack app creation service/deployment returns a payload missing one or more of clientId, clientSecret, signingSecret, appId, or oauthAuthorizeUrl — e.g. upstream provisioning partially failed or returned an error body shaped like a success.","commonSituations":"Slack API outage or partial provisioning; wrong/legacy Slack manifest template; credentials service returning empty secrets; misconfigured Slack app creation endpoint env vars.","solutions":["Inspect the raw response from the Slack app creation service to see which field was absent","Retry app creation — transient upstream failures often resolve on a second attempt","Verify the Slack app creation service/env configuration (manifest, scopes, credentials) is correct","Check Slack API status / auth for the workspace being provisioned"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"const response = await createSlackAppRemotely(...)\nconst required = [\"clientId\",\"clientSecret\",\"signingSecret\",\"appId\",\"oauthAuthorizeUrl\"] as const\nconst missing = required.filter(k => !response[k])\nif (missing.length) {\n  throw new Error(`Slack provisioning response missing: ${missing.join(\", \")}`)\n}","typeGuard":"function isCompleteSlackAppResponse(r: Partial<Record<string, string>>): r is Required<Pick<Record<string,string>, \"clientId\"|\"clientSecret\"|\"signingSecret\"|\"appId\"|\"oauthAuthorizeUrl\">> {\n  return !!(r.clientId && r.clientSecret && r.signingSecret && r.appId && r.oauthAuthorizeUrl)\n}","tryCatchPattern":"try {\n  await createAgentSlackApp(ctx)\n} catch (err) {\n  if (err instanceof HTTPError && err.message.includes(\"Slack app creation response was incomplete\")) {\n    // inspect upstream provisioning logs / retry creation\n  } else { throw err }\n}","preventionTips":["Monitor the Slack app creation service for partial failures","Validate the provisioning response shape before persisting anything to the agent","Keep Slack manifest templates and env config under version control","Alert on provisioning responses missing any required field"],"tags":["slack","oauth","integration","api-response"],"backgroundTag":"slack-app-provisioning-incomplete","analyzedSha":"a81a902e9a8fe55b467d106765f6638f12e35c49","analyzedAt":"2026-08-29T01:03:10.972Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}