(
ref: ConnectionRef,
)
| 4300 | ); |
| 4301 | |
| 4302 | const connectionsRefresh = ( |
| 4303 | ref: ConnectionRef, |
| 4304 | ): Effect.Effect< |
| 4305 | readonly Tool[], |
| 4306 | ConnectionNotFoundError | IntegrationNotFoundError | StorageFailure |
| 4307 | > => |
| 4308 | Effect.gen(function* () { |
| 4309 | const row = yield* findConnectionRow(ref); |
| 4310 | if (!row) { |
| 4311 | return yield* new ConnectionNotFoundError({ |
| 4312 | owner: ref.owner, |
| 4313 | integration: ref.integration, |
| 4314 | name: ref.name, |
| 4315 | }); |
| 4316 | } |
| 4317 | const integrationRow = yield* findIntegrationRow(ref.integration); |
| 4318 | if (!integrationRow) { |
| 4319 | return yield* new IntegrationNotFoundError({ slug: ref.integration }); |
| 4320 | } |
| 4321 | return yield* produceConnectionTools(integrationRow, ref); |
| 4322 | }); |
| 4323 | |
| 4324 | // No health-check capability ⇒ "unknown" rather than an error: the caller |
| 4325 | // can still render the connection, just without a liveness verdict. |
no test coverage detected