(
ref: ConnectionRef,
)
| 3779 | ); |
| 3780 | |
| 3781 | const connectionsRefresh = ( |
| 3782 | ref: ConnectionRef, |
| 3783 | ): Effect.Effect< |
| 3784 | readonly Tool[], |
| 3785 | ConnectionNotFoundError | IntegrationNotFoundError | StorageFailure |
| 3786 | > => |
| 3787 | Effect.gen(function* () { |
| 3788 | const row = yield* findConnectionRow(ref); |
| 3789 | if (!row) { |
| 3790 | return yield* new ConnectionNotFoundError({ |
| 3791 | owner: ref.owner, |
| 3792 | integration: ref.integration, |
| 3793 | name: ref.name, |
| 3794 | }); |
| 3795 | } |
| 3796 | const integrationRow = yield* findIntegrationRow(ref.integration); |
| 3797 | if (!integrationRow) { |
| 3798 | return yield* new IntegrationNotFoundError({ slug: ref.integration }); |
| 3799 | } |
| 3800 | return yield* produceConnectionTools(integrationRow, ref); |
| 3801 | }); |
| 3802 | |
| 3803 | // No health-check capability ⇒ "unknown" rather than an error: the caller |
| 3804 | // can still render the connection, just without a liveness verdict. |
no test coverage detected