{"record":{"id":"dc8077e2d3677a1e","repo":"paperclipai/paperclip","slug":"company-authorization-policy-updates-are-not-suppo","errorCode":null,"errorMessage":"Company authorization policy updates are not supported by the current core schema","messagePattern":"Company authorization policy updates are not supported by the current core schema","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/src/services/plugin-host-services.ts","lineNumber":3142,"sourceCode":"          await db\n            .update(projectsTable)\n            .set({ executionWorkspacePolicy, updatedAt: new Date() })\n            .where(eq(projectsTable.id, project.id));\n        } else if (params.resourceType === \"issue\") {\n          const issue = requireInCompany(\"Issue\", await issues.getById(params.resourceId), companyId);\n          const executionPolicy = issue.executionPolicy && typeof issue.executionPolicy === \"object\"\n            ? { ...(issue.executionPolicy as Record<string, unknown>) }\n            : {};\n          if (policy) executionPolicy.authorizationPolicy = policy;\n          else delete executionPolicy.authorizationPolicy;\n          await db\n            .update(issuesTable)\n            .set({ executionPolicy, updatedAt: new Date() })\n            .where(eq(issuesTable.id, issue.id));\n        } else {\n          const company = await companies.getById(params.resourceId);\n          if (!company || company.id !== companyId) throw new Error(\"Company not found\");\n          throw new Error(\"Company authorization policy updates are not supported by the current core schema\");\n        }\n        await logPluginActivity({\n          companyId,\n          action: \"authorization.policy_updated_by_plugin\",\n          entityType: params.resourceType,\n          entityId: params.resourceId,\n          details: { hasPolicy: Boolean(policy) },\n        });\n        const updated = await readAuthorizationPolicy(companyId, params.resourceType, params.resourceId);\n        if (!updated) throw new Error(\"Policy resource not found\");\n        return updated;\n      },\n      async previewAssignment(params) {\n        const companyId = ensureCompanyId(params.companyId);\n        await ensurePluginAvailableForCompany(companyId);\n        return authorization.decide({\n          actor: pluginAssignmentActor(params.actor),\n          action: \"tasks:assign\",","sourceCodeStart":3124,"sourceCodeEnd":3160,"githubUrl":"https://github.com/paperclipai/paperclip/blob/a7e689b3c35347b529cb9f54c9b9a8575a3dcab6/server/src/services/plugin-host-services.ts#L3124-L3160","documentation":"A company-level authorization policy update was requested and the company exists, but the current core schema has no column/table to persist a company-wide authorization policy, so the host explicitly refuses rather than silently ignoring it.","triggerScenarios":"Thrown at server/src/services/plugin-host-services.ts:3133 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Company authorization policy updates require a newer core schema. Upgrade the Paperclip server/schema to a version that supports authorization policies, or drop the policy update call."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a7e689b3c35347b529cb9f54c9b9a8575a3dcab6","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}