(
ref: ConnectionRef,
)
| 2778 | ); |
| 2779 | |
| 2780 | const connectionsRefresh = ( |
| 2781 | ref: ConnectionRef, |
| 2782 | ): Effect.Effect< |
| 2783 | readonly Tool[], |
| 2784 | ConnectionNotFoundError | IntegrationNotFoundError | StorageFailure |
| 2785 | > => |
| 2786 | Effect.gen(function* () { |
| 2787 | const row = yield* findConnectionRow(ref); |
| 2788 | if (!row) { |
| 2789 | return yield* new ConnectionNotFoundError({ |
| 2790 | owner: ref.owner, |
| 2791 | integration: ref.integration, |
| 2792 | name: ref.name, |
| 2793 | }); |
| 2794 | } |
| 2795 | const integrationRow = yield* findIntegrationRow(ref.integration); |
| 2796 | if (!integrationRow) { |
| 2797 | return yield* new IntegrationNotFoundError({ slug: ref.integration }); |
| 2798 | } |
| 2799 | return yield* produceConnectionTools(integrationRow, ref); |
| 2800 | }); |
| 2801 | |
| 2802 | // No health-check capability ⇒ "unknown" rather than an error: the caller |
| 2803 | // can still render the connection, just without a liveness verdict. |
no test coverage detected