(
ref: ConnectionRef,
)
| 3562 | ); |
| 3563 | |
| 3564 | const connectionsRefresh = ( |
| 3565 | ref: ConnectionRef, |
| 3566 | ): Effect.Effect< |
| 3567 | readonly Tool[], |
| 3568 | ConnectionNotFoundError | IntegrationNotFoundError | StorageFailure |
| 3569 | > => |
| 3570 | Effect.gen(function* () { |
| 3571 | const row = yield* findConnectionRow(ref); |
| 3572 | if (!row) { |
| 3573 | return yield* new ConnectionNotFoundError({ |
| 3574 | owner: ref.owner, |
| 3575 | integration: ref.integration, |
| 3576 | name: ref.name, |
| 3577 | }); |
| 3578 | } |
| 3579 | const integrationRow = yield* findIntegrationRow(ref.integration); |
| 3580 | if (!integrationRow) { |
| 3581 | return yield* new IntegrationNotFoundError({ slug: ref.integration }); |
| 3582 | } |
| 3583 | return yield* produceConnectionTools(integrationRow, ref); |
| 3584 | }); |
| 3585 | |
| 3586 | // No health-check capability ⇒ "unknown" rather than an error: the caller |
| 3587 | // can still render the connection, just without a liveness verdict. |
no test coverage detected