(
ref: ConnectionRef,
)
| 3201 | ); |
| 3202 | |
| 3203 | const connectionsRefresh = ( |
| 3204 | ref: ConnectionRef, |
| 3205 | ): Effect.Effect< |
| 3206 | readonly Tool[], |
| 3207 | ConnectionNotFoundError | IntegrationNotFoundError | StorageFailure |
| 3208 | > => |
| 3209 | Effect.gen(function* () { |
| 3210 | const row = yield* findConnectionRow(ref); |
| 3211 | if (!row) { |
| 3212 | return yield* new ConnectionNotFoundError({ |
| 3213 | owner: ref.owner, |
| 3214 | integration: ref.integration, |
| 3215 | name: ref.name, |
| 3216 | }); |
| 3217 | } |
| 3218 | const integrationRow = yield* findIntegrationRow(ref.integration); |
| 3219 | if (!integrationRow) { |
| 3220 | return yield* new IntegrationNotFoundError({ slug: ref.integration }); |
| 3221 | } |
| 3222 | return yield* produceConnectionTools(integrationRow, ref); |
| 3223 | }); |
| 3224 | |
| 3225 | // No health-check capability ⇒ "unknown" rather than an error: the caller |
| 3226 | // can still render the connection, just without a liveness verdict. |
no test coverage detected