(
ref: ConnectionRef,
)
| 2569 | ); |
| 2570 | |
| 2571 | const connectionsRefresh = ( |
| 2572 | ref: ConnectionRef, |
| 2573 | ): Effect.Effect< |
| 2574 | readonly Tool[], |
| 2575 | ConnectionNotFoundError | IntegrationNotFoundError | StorageFailure |
| 2576 | > => |
| 2577 | Effect.gen(function* () { |
| 2578 | const row = yield* findConnectionRow(ref); |
| 2579 | if (!row) { |
| 2580 | return yield* new ConnectionNotFoundError({ |
| 2581 | owner: ref.owner, |
| 2582 | integration: ref.integration, |
| 2583 | name: ref.name, |
| 2584 | }); |
| 2585 | } |
| 2586 | const integrationRow = yield* findIntegrationRow(ref.integration); |
| 2587 | if (!integrationRow) { |
| 2588 | return yield* new IntegrationNotFoundError({ slug: ref.integration }); |
| 2589 | } |
| 2590 | return yield* produceConnectionTools(integrationRow, ref); |
| 2591 | }); |
| 2592 | |
| 2593 | // No health-check capability ⇒ "unknown" rather than an error: the caller |
| 2594 | // can still render the connection, just without a liveness verdict. |
no test coverage detected