(
ref: ConnectionRef,
)
| 4864 | ); |
| 4865 | |
| 4866 | const connectionsRefresh = ( |
| 4867 | ref: ConnectionRef, |
| 4868 | ): Effect.Effect< |
| 4869 | readonly Tool[], |
| 4870 | ConnectionNotFoundError | IntegrationNotFoundError | OrgWriteDeniedError | StorageFailure |
| 4871 | > => |
| 4872 | Effect.gen(function* () { |
| 4873 | yield* guardOrgWrite(ref.owner); |
| 4874 | const row = yield* findConnectionRow(ref); |
| 4875 | if (!row) { |
| 4876 | return yield* new ConnectionNotFoundError({ |
| 4877 | owner: ref.owner, |
| 4878 | integration: ref.integration, |
| 4879 | name: ref.name, |
| 4880 | }); |
| 4881 | } |
| 4882 | const integrationRow = yield* findIntegrationRow(ref.integration); |
| 4883 | if (!integrationRow) { |
| 4884 | return yield* new IntegrationNotFoundError({ slug: ref.integration }); |
| 4885 | } |
| 4886 | return yield* produceConnectionTools(integrationRow, ref); |
| 4887 | }); |
| 4888 | |
| 4889 | // No health-check capability ⇒ "unknown" rather than an error: the caller |
| 4890 | // can still render the connection, just without a liveness verdict. |
no test coverage detected