summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorKit Langton <[email protected]>2026-03-10 20:39:07 -0400
committerGitHub <[email protected]>2026-03-11 00:39:07 +0000
commita1b06d63c93e9a7cc5387c8fbaac8ea5621a34b6 (patch)
treeb9aef8f44800aa6d770eb52ec828b62c6b03ff9b
parent1b6820bab5e12abf695b6283f319c8da92a537d9 (diff)
downloadopencode-a1b06d63c93e9a7cc5387c8fbaac8ea5621a34b6.tar.gz
opencode-a1b06d63c93e9a7cc5387c8fbaac8ea5621a34b6.zip
fix(account): resilient orgs fetch (#16944)
-rw-r--r--packages/opencode/src/account/service.ts8
1 files changed, 7 insertions, 1 deletions
diff --git a/packages/opencode/src/account/service.ts b/packages/opencode/src/account/service.ts
index c57bb459a..ab1de7255 100644
--- a/packages/opencode/src/account/service.ts
+++ b/packages/opencode/src/account/service.ts
@@ -192,11 +192,17 @@ export class AccountService extends ServiceMap.Service<
const orgsByAccount = Effect.fn("AccountService.orgsByAccount")(function* () {
const accounts = yield* repo.list()
- return yield* Effect.forEach(
+ const [errors, results] = yield* Effect.partition(
accounts,
(account) => orgs(account.id).pipe(Effect.map((orgs) => ({ account, orgs }))),
{ concurrency: 3 },
)
+ for (const error of errors) {
+ yield* Effect.logWarning("failed to fetch orgs for account").pipe(
+ Effect.annotateLogs({ error: String(error) }),
+ )
+ }
+ return results
})
const orgs = Effect.fn("AccountService.orgs")(function* (accountID: AccountID) {