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