Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

feat(gateway): guard activateGateway with availability check

Steven Enamakel9de3f6bc7cb6
diff --git a/app/src/services/gatewayService.ts b/app/src/services/gatewayService.ts
index 1824da50ba..28051b7139 100644
--- a/app/src/services/gatewayService.ts
+++ b/app/src/services/gatewayService.ts
@@ -142,6 +142,9 @@ export async function deleteGateway(id: string): Promise<void> {
* old one down only after the new one answers.
*/
export async function activateGateway(id: string): Promise<void> {
+ if (!gatewaysAvailable()) {
+ throw new Error('gateways are unavailable in this build');
+ }
log('activating gateway %s', id);
// The shell answers `core_rpc_url` / `core_rpc_token` from the active
// gateway and never hands the bearer to the renderer — this call is an