(
ref: ConnectionRef,
)
| 3055 | ); |
| 3056 | |
| 3057 | const connectionsRefresh = ( |
| 3058 | ref: ConnectionRef, |
| 3059 | ): Effect.Effect< |
| 3060 | readonly Tool[], |
| 3061 | ConnectionNotFoundError | IntegrationNotFoundError | StorageFailure |
| 3062 | > => |
| 3063 | Effect.gen(function* () { |
| 3064 | const row = yield* findConnectionRow(ref); |
| 3065 | if (!row) { |
| 3066 | return yield* new ConnectionNotFoundError({ |
| 3067 | owner: ref.owner, |
| 3068 | integration: ref.integration, |
| 3069 | name: ref.name, |
| 3070 | }); |
| 3071 | } |
| 3072 | const integrationRow = yield* findIntegrationRow(ref.integration); |
| 3073 | if (!integrationRow) { |
| 3074 | return yield* new IntegrationNotFoundError({ slug: ref.integration }); |
| 3075 | } |
| 3076 | return yield* produceConnectionTools(integrationRow, ref); |
| 3077 | }); |
| 3078 | |
| 3079 | // No health-check capability ⇒ "unknown" rather than an error: the caller |
| 3080 | // can still render the connection, just without a liveness verdict. |
no test coverage detected