{"record":{"id":"4ed27b1c47ee96d2","repo":"ComposioHQ/composio","slug":"toolkit-with-slug-slug-not-found","errorCode":null,"errorMessage":"Toolkit with slug ${slug} not found","messagePattern":"Toolkit with slug (.+?) not found","errorType":"exception","errorClass":"ComposioToolkitNotFoundError","httpStatus":404,"severity":"warning","filePath":"ts/packages/core/src/models/Toolkits.ts","lineNumber":114,"sourceCode":"   *\n   * @private\n   */\n  protected async getToolkitBySlug(\n    slug: string,\n    requestOptions?: ComposioRequestOptions\n  ): Promise<ToolkitRetrieveResponse> {\n    try {\n      const result = await withCancellation(\n        () => this.client.toolkits.retrieve(slug, undefined, requestOptions),\n        requestOptions?.signal\n      );\n      return transformToolkitRetrieveResponse(result);\n    } catch (error) {\n      if (error instanceof ComposioRequestCancelledError) {\n        throw error;\n      }\n      if (error instanceof APIError && (error.status === 404 || error.status === 400)) {\n        throw new ComposioToolkitNotFoundError(`Toolkit with slug ${slug} not found`, {\n          meta: {\n            slug,\n          },\n          cause: error,\n        });\n      }\n      throw new ComposioToolkitFetchError(`Couldn't fetch Toolkit with slug: ${slug}`, {\n        meta: {\n          slug,\n        },\n        cause: error,\n      });\n    }\n  }\n\n  /**\n   * Retrieves a specific toolkit by its slug identifier.\n   *","sourceCodeStart":96,"sourceCodeEnd":132,"githubUrl":"https://github.com/ComposioHQ/composio/blob/64b1b85502b1beeb2379e6c9e8bf1104504fa637/ts/packages/core/src/models/Toolkits.ts#L96-L132","documentation":"getToolkitBySlug() catches errors from the retrieve call and, when the API returns 404 or 400, throws ComposioToolkitNotFoundError with the requested slug in meta. This gives a precise, catchable not-found signal instead of a raw APIError. Other statuses propagate as their original errors.","triggerScenarios":"composio.toolkits.get('slug') or .toolkit('slug') where the slug does not exist, is typo'd, uses wrong casing, or refers to a toolkit not visible to the workspace/API key.","commonSituations":"Slug typos or casing mistakes (e.g. 'GITHUB' vs 'github'), referencing a toolkit renamed or removed in a newer API, or using an API key scoped to a workspace without that toolkit installed.","solutions":["Confirm the exact slug via composio.toolkits.get() listing or the Composio app directory","Fix casing/spelling of the slug string","If the toolkit was renamed, update to its new slug","Check that the connected workspace/API key can access the toolkit"],"exampleFix":"// before\nconst tk = await composio.toolkits.get('GITHUB');\n// after\nconst all = await composio.toolkits.get();\nconst slug = all.items.find(t => t.name?.toLowerCase() === 'github')?.slug;\nif (!slug) throw new Error('github toolkit unavailable');\nconst tk = await composio.toolkits.get(slug);","handlingStrategy":"type-guard","validationCode":null,"typeGuard":"const isToolkitNotFound = (e: unknown): e is ComposioToolkitNotFoundError =>\n  e instanceof ComposioToolkitNotFoundError;","tryCatchPattern":"try { const tk = await composio.toolkits.get(slug); } catch (e) {\n  if (e instanceof ComposioToolkitNotFoundError) { /* fallback: list and fuzzy-match slug */ }\n  throw e;\n}","preventionTips":["Resolve slugs dynamically from the toolkit list instead of hardcoding","Normalize slug casing before calling get","Handle not-found as an expected branch in user-facing flows"],"tags":["not-found","toolkits","slug","api-error"],"backgroundTag":"resource-not-found","analyzedSha":"64b1b85502b1beeb2379e6c9e8bf1104504fa637","analyzedAt":"2026-08-28T15:39:33.623Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}