{"record":{"id":"cf80e7e8a6ad35ca","repo":"Kong/insomnia","slug":"specification-content-not-found-using-api-spec-id","errorCode":null,"errorMessage":"Specification content not found using API spec id: \"${identifier}\" in \"${pathToSearch}\"","messagePattern":"Specification content not found using API spec id: \"(.+?)\" in \"(.+?)\"","errorType":"exception","errorClass":"InsoError","httpStatus":null,"severity":"error","filePath":"packages/insomnia-inso/src/cli.ts","lineNumber":156,"sourceCode":"    console.log = oldConsoleLog;\n  }\n};\n\nconst getWorkingDir = (options: { workingDir?: string }): string => {\n  if (options.workingDir) {\n    return nodePath.resolve(options.workingDir);\n  }\n\n  logger.warn('No working directory provided, using local app data directory.');\n  return localAppDir;\n};\n\nconst resolveSpecInDatabase = async (identifier: string, options: GlobalOptions) => {\n  const pathToSearch = getWorkingDir(options);\n\n  const db = await loadDb({ pathToSearch, filterTypes: ['ApiSpec'] });\n  if (!db.ApiSpec.length) {\n    throw new InsoError(`Specification content not found using API spec id: \"${identifier}\" in \"${pathToSearch}\"`);\n  }\n  const specFromDb = identifier ? loadApiSpec(db, identifier) : await promptApiSpec(db, options.ci);\n  if (!specFromDb?.contents) {\n    throw new InsoError(`Specification content not found using API spec id: \"${identifier}\" in \"${pathToSearch}\"`);\n  }\n  return specFromDb.contents;\n};\nconst getWorkspaceOrFallback = async (db: Database, identifier: string, ci: boolean) => {\n  if (identifier) {\n    return loadWorkspace(db, identifier);\n  }\n  if (ci && db.Workspace.length > 0) {\n    return db.Workspace[0];\n  }\n  return await promptWorkspace(db, !!ci);\n};\nconst getRequestsToRunFromListOrWorkspace = (db: Database, workspaceId: string, item: string[]): Request[] => {\n  const getRequestGroupIdsRecursively = (from: string[]): string[] => {","sourceCodeStart":138,"sourceCodeEnd":174,"githubUrl":"https://github.com/Kong/insomnia/blob/d9bb2b0142600f21309832daea3317942d285984/packages/insomnia-inso/src/cli.ts#L138-L174","documentation":"Error \"Specification content not found using API spec id: \"${identifier}\" in \"${pathToSearch}\"\" thrown in Kong/insomnia.","triggerScenarios":"Thrown at packages/insomnia-inso/src/cli.ts:156 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"d9bb2b0142600f21309832daea3317942d285984","analyzedAt":"2026-08-26T18:04:05.187Z","schemaVersion":2},"datasetVersion":"2026-08-26T21:11:00.512Z"}