{"record":{"id":"24600cc115f8a2ab","repo":"paperclipai/paperclip","slug":"status-is-required","errorCode":null,"errorMessage":"status is required","messagePattern":"status is required","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/plugins/plugin-llm-wiki/src/worker.ts","lineNumber":813,"sourceCode":"        routineOverridesFromParams(params),\n      );\n    });\n\n    ctx.actions.register(\"reconcile-managed-routine\", async (params) => {\n      return ctx.routines.managed.reconcile(\n        routineKeyField(params.routineKey),\n        readCompanyIdFromParams(params),\n        routineOverridesFromParams(params),\n      );\n    });\n\n    ctx.actions.register(\"reconcile-managed-routines\", async (params) => {\n      return reconcileWikiRoutineResources(ctx, readCompanyIdFromParams(params));\n    });\n\n    ctx.actions.register(\"update-managed-routine-status\", async (params) => {\n      const status = stringField(params.status);\n      if (!status) throw new Error(\"status is required\");\n      return ctx.routines.managed.update(routineKeyField(params.routineKey), readCompanyIdFromParams(params), {\n        status,\n      });\n    });\n\n    ctx.actions.register(\"run-managed-routine\", async (params) => {\n      return ctx.routines.managed.run(\n        routineKeyField(params.routineKey),\n        readCompanyIdFromParams(params),\n        routineOverridesFromParams(params),\n      );\n    });\n\n    ctx.data.register(\"pages\", async (params) => {\n      const companyId = readCompanyIdFromParams(params);\n      return listPages(ctx, {\n        companyId,\n        wikiId: stringField(params.wikiId),","sourceCodeStart":795,"sourceCodeEnd":831,"githubUrl":"https://github.com/paperclipai/paperclip/blob/67001ec6eb96ae601aa27bc91d9b2415d665334a/packages/plugins/plugin-llm-wiki/src/worker.ts#L795-L831","documentation":"Thrown by the llm-wiki plugin's `update-managed-routine-status` action (worker.ts:813) when `params.status` is absent or empty after `stringField` coercion. The action reads the status string, and only forwards it to `ctx.routines.managed.update` if it is truthy, so a missing/blank status is treated as a caller error rather than a silent no-op.","triggerScenarios":"Calling the registered plugin action `update-managed-routine-status` without `status` in params, with `status: \"\"`, or with `status` set to a non-string value that `stringField` coerces to empty (e.g. null/number/object).","commonSituations":"An orchestrator or board UI issues a managed-routine status transition (e.g. pausing/resuming a wiki maintenance routine) and forgets the status field, or sends the wrong key name (e.g. `routineStatus` instead of `status`). Also occurs when a test fixture constructs the action params incompletely.","solutions":["Include a non-empty `status` string in the action params (e.g. `\"active\"`, `\"paused\"`) alongside `routineKey` and `companyId`.","Verify the exact param key name is `status` and that it is a trimmed non-empty string before dispatching the action.","If driving the action from a UI, disable the submit control until a status value is selected."],"exampleFix":"// before\nctx.actions.run(\"update-managed-routine-status\", { routineKey, companyId });\n// after\nctx.actions.run(\"update-managed-routine-status\", { routineKey, companyId, status: \"active\" });","handlingStrategy":"validation","validationCode":"function buildRoutineStatusParams(input) {\n  const status = typeof input.status === \"string\" ? input.status.trim() : \"\";\n  if (!status) throw new TypeError(\"status is required (non-empty string)\");\n  return { routineKey: input.routineKey, companyId: input.companyId, status };\n}\n// run buildRoutineStatusParams(params) BEFORE ctx.actions.run(...)","typeGuard":"function isValidRoutineStatusParams(p): p is { routineKey: string; companyId: string; status: string } {\n  return typeof p?.status === \"string\" && p.status.trim().length > 0\n    && typeof p?.routineKey === \"string\" && p.routineKey.trim().length > 0\n    && typeof p?.companyId === \"string\" && p.companyId.trim().length > 0;\n}","tryCatchPattern":null,"preventionTips":["Centralize action-param construction in a builder that asserts required string fields.","Disable UI submit controls until status is selected.","Add a unit test that the action throws on missing status."],"tags":["plugin","llm-wiki","validation","param-validation","routines"],"backgroundTag":null,"analyzedSha":"67001ec6eb96ae601aa27bc91d9b2415d665334a","analyzedAt":"2026-08-12T12:05:45.408Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}