mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-23 21:16:06 +00:00
chore: generate
This commit is contained in:
parent
4308dd75fb
commit
b0ca0419be
3 changed files with 101 additions and 17 deletions
|
|
@ -28,20 +28,16 @@ export const providerHandlers = HttpApiBuilder.group(InstanceHttpApi, "v2.provid
|
|||
const catalog = yield* Catalog.Service
|
||||
const pluginBoot = yield* PluginBoot.Service
|
||||
yield* pluginBoot.wait().pipe(Effect.catchDefect(() => Effect.fail(catalogUnavailable)))
|
||||
return yield* catalog.provider
|
||||
.get(ctx.params.providerID)
|
||||
.pipe(
|
||||
Effect.catchTag(
|
||||
"CatalogV2.ProviderNotFound",
|
||||
(error) =>
|
||||
Effect.fail(
|
||||
new ProviderNotFoundError({
|
||||
providerID: error.providerID,
|
||||
message: `Provider not found: ${error.providerID}`,
|
||||
}),
|
||||
),
|
||||
return yield* catalog.provider.get(ctx.params.providerID).pipe(
|
||||
Effect.catchTag("CatalogV2.ProviderNotFound", (error) =>
|
||||
Effect.fail(
|
||||
new ProviderNotFoundError({
|
||||
providerID: error.providerID,
|
||||
message: `Provider not found: ${error.providerID}`,
|
||||
}),
|
||||
),
|
||||
)
|
||||
),
|
||||
)
|
||||
}),
|
||||
)
|
||||
}),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue