{"record":{"id":"bd9aeb2069195aee","repo":"paperclipai/paperclip","slug":"llm-wiki-space-status-must-be-active-or-archived","errorCode":null,"errorMessage":"LLM Wiki space status must be active or archived.","messagePattern":"LLM Wiki space status must be active or archived\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/plugins/plugin-llm-wiki/src/wiki/core.ts","lineNumber":1467,"sourceCode":"    configuredRootPath: null,\n    accessScope,\n    ownerUserId: null,\n    ownerAgentId: null,\n    teamKey: null,\n    settings: input.settings ?? {},\n    status: \"active\",\n    createdAt: null,\n    updatedAt: null,\n  };\n  await bootstrapSpaceFiles(ctx, input.companyId, space);\n  await upsertWikiInstance(ctx, { companyId: input.companyId, wikiId });\n  return { status: \"created\", space };\n}\n\nexport async function updateSpace(ctx: PluginContext, input: UpdateSpaceInput): Promise<{ status: \"ok\"; space: WikiSpace }> {\n  const nextStatus = input.status ?? null;\n  if (nextStatus !== null && nextStatus !== \"active\" && nextStatus !== \"archived\") {\n    throw new Error(\"LLM Wiki space status must be active or archived.\");\n  }\n  const space = nextStatus === \"active\" ? await resolveSpaceAnyStatus(ctx, input) : await resolveSpace(ctx, input);\n  const nextDisplayName = stringField(input.displayName);\n  if (space.slug === DEFAULT_SPACE_SLUG && nextStatus === \"archived\") {\n    throw new Error(\"The default LLM Wiki space cannot be archived.\");\n  }\n  await ctx.db.execute(\n    `UPDATE ${spaceTable(ctx)}\n        SET display_name = COALESCE($4, display_name),\n            settings = CASE WHEN $5::jsonb IS NULL THEN settings ELSE settings || $5::jsonb END,\n            status = COALESCE($6, status),\n            updated_at = now()\n      WHERE company_id = $1 AND wiki_id = $2 AND slug = $3`,\n    [\n      input.companyId,\n      space.wikiId,\n      space.slug,\n      nextDisplayName,","sourceCodeStart":1449,"sourceCodeEnd":1485,"githubUrl":"https://github.com/paperclipai/paperclip/blob/5716fe907e596ce73501408fc6efdb19fb61edf2/packages/plugins/plugin-llm-wiki/src/wiki/core.ts#L1449-L1485","documentation":"Error \"LLM Wiki space status must be active or archived.\" thrown in paperclipai/paperclip.","triggerScenarios":"Thrown at packages/plugins/plugin-llm-wiki/src/wiki/core.ts:1468 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set the space status to either 'active' or 'archived'."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5716fe907e596ce73501408fc6efdb19fb61edf2","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}