mastra-ai/mastra · error
App creation failed: ${errorDetails}
Error message
App creation failed: ${errorDetails} What it means
createApp calls Slack's app-creation endpoint and expects ok:true. When ok is false the client builds an errorDetails string from data.error, plus per-field validation errors (data.errors with pointer/message) and response_metadata.messages, and throws with them.
Source
Thrown at channels/slack/src/client.ts:148
app_id?: string;
credentials?: {
client_id: string;
client_secret: string;
signing_secret: string;
};
oauth_authorize_url?: string;
};
if (!data.ok) {
// Slack may include detailed error info
let errorDetails = data.error ?? 'unknown_error';
if (data.errors?.length) {
errorDetails += ': ' + data.errors.map(e => `${e.pointer}: ${e.message}`).join(', ');
}
if (data.response_metadata?.messages?.length) {
errorDetails += ' - ' + data.response_metadata.messages.join(', ');
}
throw new Error(`App creation failed: ${errorDetails}`);
}
if (!data.app_id || !data.credentials || !data.oauth_authorize_url) {
throw new Error('App creation returned incomplete data');
}
return {
appId: data.app_id,
clientId: data.credentials.client_id,
clientSecret: data.credentials.client_secret,
signingSecret: data.credentials.signing_secret,
oauthAuthorizeUrl: data.oauth_authorize_url,
};
}
/**
* Delete a Slack app.
*/View on GitHub (pinned to 75dd419e61)
Solutions
- Read errorDetails in the message — it names the failing manifest fields (pointer) and Slack's messages; fix those fields in your SlackAppManifest
- Verify your app configuration token is valid and has permission to create apps
- Validate the manifest against Slack's manifest schema/docs before calling createApp
Example fix
// before
manifest.oauth_config = { redirect_urls: ['http://localhost/callback'] }; // http not allowed
// after
manifest.oauth_config = { redirect_urls: ['https://myapp.example.com/callback'] }; Defensive patterns
Strategy: validation
Validate before calling
function validateManifest(m: SlackAppManifest): string[] {
const errs: string[] = [];
if (!m.display_information?.name) errs.push('display_information.name required');
if (!m.oauth_config?.redirect_urls?.every(u => u.startsWith('https://'))) errs.push('redirect_urls must be https');
if (!m.settings?.org_deploy_enabled && !m.settings) errs.push('settings required');
return errs;
}
const errs = validateManifest(manifest); if (errs.length) throw new Error(errs.join(', ')); Try / catch
try {
await client.createApp(manifest);
} catch (e) {
const msg = (e as Error).message;
if (msg.startsWith('App creation failed:')) {
// msg contains pointer/message details — fix those manifest fields and retry
} else throw e;
} Prevention
- Validate the manifest against Slack's manifest schema before createApp
- Use https redirect URLs and valid icon references
- Ensure app configuration tokens have creation permissions
- Change manifest fields incrementally to isolate validation failures
When it happens
Trigger: createApp() receives { ok: false } from Slack — e.g. invalid manifest, validation errors on specific manifest fields, or an auth/permission failure on the app-creation API.
Common situations: Manifest failing Slack validation (invalid icons, bad settings, missing required fields); using app config tokens without the right scopes; typo'd manifest after editing; Slack rejecting unsupported manifest features.
Related errors
- App manifest update failed: ${errorDetails}
- Token rotation failed: ${data.error}
- App deletion failed: ${data.error}
- Failed to check whether Slack app exists: ${data.error ?? 'u
- connect({ id, name }): "name" is required when connecting wi
AI-assisted analysis of mastra-ai/mastra@75dd419e61 (2026-08-30).
Data as JSON: /api/errors/18fdb29162f7002f.
Report an issue: GitHub.