(
ref: ConnectionRef,
)
| 2695 | ); |
| 2696 | |
| 2697 | const connectionsRefresh = ( |
| 2698 | ref: ConnectionRef, |
| 2699 | ): Effect.Effect< |
| 2700 | readonly Tool[], |
| 2701 | ConnectionNotFoundError | IntegrationNotFoundError | StorageFailure |
| 2702 | > => |
| 2703 | Effect.gen(function* () { |
| 2704 | const row = yield* findConnectionRow(ref); |
| 2705 | if (!row) { |
| 2706 | return yield* new ConnectionNotFoundError({ |
| 2707 | owner: ref.owner, |
| 2708 | integration: ref.integration, |
| 2709 | name: ref.name, |
| 2710 | }); |
| 2711 | } |
| 2712 | const integrationRow = yield* findIntegrationRow(ref.integration); |
| 2713 | if (!integrationRow) { |
| 2714 | return yield* new IntegrationNotFoundError({ slug: ref.integration }); |
| 2715 | } |
| 2716 | return yield* produceConnectionTools(integrationRow, ref); |
| 2717 | }); |
| 2718 | |
| 2719 | // No health-check capability ⇒ "unknown" rather than an error: the caller |
| 2720 | // can still render the connection, just without a liveness verdict. |
no test coverage detected