{"record":{"id":"c508f84b3d1eee0c","repo":"Budibase/budibase","slug":"self-host-cloud-db-not-found","errorCode":null,"errorMessage":"Self-host cloud DB not found","messagePattern":"Self-host cloud DB not found","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/backend-core/src/context/mainContext.ts","lineNumber":202,"sourceCode":"  task: () => T\n): Promise<T> {\n  return newContext({ license }, task)\n}\n\nexport function getLicense(): License | undefined {\n  const context = Context.get()\n  return context?.license\n}\n\nexport function isSelfHostUsingCloud() {\n  const context = Context.get()\n  return !!context?.isSelfHostUsingCloud\n}\n\nexport function getSelfHostCloudDB() {\n  const context = Context.get()\n  if (!context || !context.isSelfHostUsingCloud) {\n    throw new Error(\"Self-host cloud DB not found\")\n  }\n  return getDB(StaticDatabases.SELF_HOST_CLOUD.name)\n}\n\nexport async function doInWorkspaceContext<T>(\n  workspaceId: string,\n  task: () => T\n): Promise<T> {\n  return _doInWorkspaceContext(workspaceId, task)\n}\n\nasync function _doInWorkspaceContext<T>(\n  workspaceId: string,\n  task: () => T,\n  extraContextSettings?: ContextMap\n): Promise<T> {\n  if (!workspaceId) {\n    throw new Error(\"workspaceId is required\")","sourceCodeStart":184,"sourceCodeEnd":220,"githubUrl":"https://github.com/Budibase/budibase/blob/a81a902e9a8fe55b467d106765f6638f12e35c49/packages/backend-core/src/context/mainContext.ts#L184-L220","documentation":"Error \"Self-host cloud DB not found\" thrown in Budibase/budibase.","triggerScenarios":"Thrown at packages/backend-core/src/context/mainContext.ts:202 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":"a81a902e9a8fe55b467d106765f6638f12e35c49","analyzedAt":"2026-08-29T01:03:10.972Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}