{"record":{"id":"8b64606a5c5d9da0","repo":"ComposioHQ/composio","slug":"toolkit-not-found","errorCode":"TOOLKIT_NOT_FOUND","errorMessage":"Toolkit not found","messagePattern":"Toolkit not found","errorType":"error_code","errorClass":"ComposioToolkitNotFoundError","httpStatus":null,"severity":"error","filePath":"ts/packages/core/src/errors/ToolkitErrors.ts","lineNumber":14,"sourceCode":"import { ComposioError, ComposioErrorOptions } from './ComposioError';\n\nexport const ToolkitErrorCodes = {\n  TOOLKIT_NOT_FOUND: 'TOOLKIT_NOT_FOUND',\n} as const;\n\nexport class ComposioToolkitNotFoundError extends ComposioError {\n  constructor(\n    message: string = 'Toolkit not found',\n    options: Omit<ComposioErrorOptions, 'code' | 'statusCode'> = {}\n  ) {\n    super(message, {\n      ...options,\n      code: 'TOOLKIT_NOT_FOUND',\n      possibleFixes: options.possibleFixes || [\n        'Ensure the toolkit is correctly configured and the slug is valid',\n      ],\n    });\n    this.name = 'ComposioToolkitNotFoundError';\n  }\n}\n\nexport class ComposioToolkitFetchError extends ComposioError {\n  constructor(\n    message: string = 'Failed to fetch toolkit',\n    options: Omit<ComposioErrorOptions, 'code' | 'statusCode'> = {}\n  ) {\n    super(message, {\n      ...options,\n      code: 'TOOLKIT_FETCH_ERROR',\n      possibleFixes: options.possibleFixes || [\n        'Ensure the toolkit slug is valid',","sourceCodeStart":1,"sourceCodeEnd":32,"githubUrl":"https://github.com/ComposioHQ/composio/blob/64b1b85502b1beeb2379e6c9e8bf1104504fa637/ts/packages/core/src/errors/ToolkitErrors.ts#L1-L32","documentation":"ComposioToolkitNotFoundError (code TOOLKIT_NOT_FOUND): thrown when a toolkit lookup by slug fails — the backend returned no matching toolkit. It carries suggested fixes (valid slug, correct configuration) as part of the structured ComposioError.","triggerScenarios":"Calling toolkit-getting APIs (getToolkit, toolkit(slug) with an unknown/wrong slug; typos like 'githubg'; referencing a toolkit not available on your workspace/plan or region.","commonSituations":"Typos in toolkit slugs; toolkits renamed or deprecated across API versions; environment mismatch (staging slugs vs production); custom toolkits not yet created.","solutions":["Verify the slug against the toolkit list (composio.toolkits.list())","Check for typos, casing, and hyphenation of the slug","Confirm the toolkit exists in your workspace/region and plan","Catch ComposioToolkitNotFoundError by code for graceful degradation"],"exampleFix":"// before\nconst tk = await composio.toolkits.get('gihub');\n// after\nconst all = await composio.toolkits.list();\nconst slug = all.items.find(t => t.name?.toLowerCase().includes('github'))?.slug;\nconst tk = await composio.toolkits.get(slug!);","handlingStrategy":"try-catch","validationCode":"const slugs = (await composio.toolkits.list()).items.map(t => t.slug);\nif (!slugs.includes(mySlug)) chooseAnother();","typeGuard":"import { ComposioToolkitNotFoundError } from '@composio/core/errors';\nconst isNotFound = (e: unknown): boolean => e instanceof ComposioToolkitNotFoundError;","tryCatchPattern":"try { const tk = await composio.toolkits.get(slug); } catch (e) { if (e instanceof ComposioToolkitNotFoundError) handleMissing(slug); else throw e; }","preventionTips":["Validate slugs against toolkits.list() in dynamic tool selection","Prefer IDE autocomplete over hand-typed slugs"],"tags":["toolkit","not-found","api","sdk"],"backgroundTag":"resource-not-found","analyzedSha":"64b1b85502b1beeb2379e6c9e8bf1104504fa637","analyzedAt":"2026-08-28T15:39:33.623Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}