(
ref: ConnectionRef,
)
| 3155 | ); |
| 3156 | |
| 3157 | const connectionsRefresh = ( |
| 3158 | ref: ConnectionRef, |
| 3159 | ): Effect.Effect< |
| 3160 | readonly Tool[], |
| 3161 | ConnectionNotFoundError | IntegrationNotFoundError | StorageFailure |
| 3162 | > => |
| 3163 | Effect.gen(function* () { |
| 3164 | const row = yield* findConnectionRow(ref); |
| 3165 | if (!row) { |
| 3166 | return yield* new ConnectionNotFoundError({ |
| 3167 | owner: ref.owner, |
| 3168 | integration: ref.integration, |
| 3169 | name: ref.name, |
| 3170 | }); |
| 3171 | } |
| 3172 | const integrationRow = yield* findIntegrationRow(ref.integration); |
| 3173 | if (!integrationRow) { |
| 3174 | return yield* new IntegrationNotFoundError({ slug: ref.integration }); |
| 3175 | } |
| 3176 | return yield* produceConnectionTools(integrationRow, ref); |
| 3177 | }); |
| 3178 | |
| 3179 | // No health-check capability ⇒ "unknown" rather than an error: the caller |
| 3180 | // can still render the connection, just without a liveness verdict. |
no test coverage detected