{"record":{"id":"3e52532bb9c6cbd8","repo":"different-ai/openwork","slug":"default-desktop-policy-not-found","errorCode":null,"errorMessage":"Default desktop policy not found.","messagePattern":"Default desktop policy not found\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"ee/apps/den-web/app/(den)/dashboard/_components/llm-providers-screen.tsx","lineNumber":182,"sourceCode":"      provider.models.flatMap((model) => {\n        const name = model.name.trim();\n        return name ? [name] : [];\n      }),\n    );\n    return [...new Set(names)];\n  }, [llmProviders]);\n\n  const managedOutcome = modelNames.length > 0\n    ? `Members see exactly: ${modelNames.join(\", \")}`\n    : \"Members see no models yet — add a provider below\";\n  const openOutcome = modelNames.length > 0\n    ? `Members may add their own providers; org models below include: ${modelNames.join(\", \")}`\n    : \"Members may add their own providers. No org models are defined yet.\";\n  const accessOutcome = accessMode === \"managed\" ? managedOutcome : openOutcome;\n  const accessFormDisabled = policiesBusy || accessSaving || !defaultPolicy;\n\n  const updateDefaultPolicy = async (allowCustomProviders: boolean, allowZenModel: boolean) => {\n    if (!defaultPolicy) throw new Error(\"Default desktop policy not found.\");\n    await updateDesktopPolicy(defaultPolicy.id, {\n      policyName: defaultPolicy.policyName,\n      policy: {\n        ...defaultPolicy.policy,\n        allowCustomProviders,\n        allowZenModel,\n      },\n      priority: 0,\n      isEnabled: true,\n      memberIds: [],\n      teamIds: [],\n      roles: [],\n    });\n  };\n\n  const updateAdminExceptionPolicy = async (policy: DenDesktopPolicy, isEnabled: boolean) => {\n    await updateDesktopPolicy(policy.id, {\n      policyName: ADMIN_EXCEPTION_POLICY_NAME,","sourceCodeStart":164,"sourceCodeEnd":200,"githubUrl":"https://github.com/different-ai/openwork/blob/2b7df46e8ae1517d64c896c7793d2d52ec845669/ee/apps/den-web/app/(den)/dashboard/_components/llm-providers-screen.tsx#L164-L200","documentation":"Error \"Default desktop policy not found.\" thrown in different-ai/openwork.","triggerScenarios":"Thrown at ee/apps/den-web/app/(den)/dashboard/_components/llm-providers-screen.tsx:182 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":"2b7df46e8ae1517d64c896c7793d2d52ec845669","analyzedAt":"2026-09-01T07:59:23.713Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}