{"record":{"id":"0864c81979c48d7e","repo":"Dokploy/dokploy","slug":"unauthorized-0864c8","errorCode":"UNAUTHORIZED","errorMessage":"You are not allowed to delete this registry","messagePattern":"You are not allowed to delete this registry","errorType":"exception","errorClass":"TRPCError","httpStatus":401,"severity":"error","filePath":"apps/dokploy/server/api/routers/registry.ts","lineNumber":43,"sourceCode":"export const registryRouter = createTRPCRouter({\n\tcreate: withPermission(\"registry\", \"create\")\n\t\t.input(apiCreateRegistry)\n\t\t.mutation(async ({ ctx, input }) => {\n\t\t\tconst reg = await createRegistry(input, ctx.session.activeOrganizationId);\n\t\t\tawait audit(ctx, {\n\t\t\t\taction: \"create\",\n\t\t\t\tresourceType: \"registry\",\n\t\t\t\tresourceId: reg.registryId,\n\t\t\t\tresourceName: reg.registryName,\n\t\t\t});\n\t\t\treturn reg;\n\t\t}),\n\tremove: withPermission(\"registry\", \"delete\")\n\t\t.input(apiRemoveRegistry)\n\t\t.mutation(async ({ ctx, input }) => {\n\t\t\tconst registry = await findRegistryById(input.registryId);\n\t\t\tif (registry.organizationId !== ctx.session.activeOrganizationId) {\n\t\t\t\tthrow new TRPCError({\n\t\t\t\t\tcode: \"UNAUTHORIZED\",\n\t\t\t\t\tmessage: \"You are not allowed to delete this registry\",\n\t\t\t\t});\n\t\t\t}\n\t\t\tawait audit(ctx, {\n\t\t\t\taction: \"delete\",\n\t\t\t\tresourceType: \"registry\",\n\t\t\t\tresourceId: registry.registryId,\n\t\t\t\tresourceName: registry.registryName,\n\t\t\t});\n\t\t\treturn await removeRegistry(input.registryId);\n\t\t}),\n\tupdate: withPermission(\"registry\", \"create\")\n\t\t.input(apiUpdateRegistry)\n\t\t.mutation(async ({ input, ctx }) => {\n\t\t\tconst { registryId, ...rest } = input;\n\t\t\tconst registry = await findRegistryById(registryId);\n\t\t\tif (registry.organizationId !== ctx.session.activeOrganizationId) {","sourceCodeStart":25,"sourceCodeEnd":61,"githubUrl":"https://github.com/Dokploy/dokploy/blob/546686ea3587f12ec5652217dedd9f7960fb6d15/apps/dokploy/server/api/routers/registry.ts#L25-L61","documentation":"Error \"You are not allowed to delete this registry\" thrown in Dokploy/dokploy.","triggerScenarios":"Thrown at apps/dokploy/server/api/routers/registry.ts:43 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":"546686ea3587f12ec5652217dedd9f7960fb6d15","analyzedAt":"2026-08-27T05:18:58.095Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}