From d43feb9cb166740e14b58af2475296bf75ca8d84 Mon Sep 17 00:00:00 2001 From: Nexha-dev Date: Fri, 26 Jun 2026 13:21:11 +0000 Subject: [PATCH] feat(vercel): wrap Vercel API client with circuit breaker for outage isolation Closes #766 --- apps/backend/src/app/api/deployments/[id]/health/route.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/apps/backend/src/app/api/deployments/[id]/health/route.ts b/apps/backend/src/app/api/deployments/[id]/health/route.ts index 553c98b3..df8ae6a9 100644 --- a/apps/backend/src/app/api/deployments/[id]/health/route.ts +++ b/apps/backend/src/app/api/deployments/[id]/health/route.ts @@ -1,11 +1,17 @@ import { NextRequest, NextResponse } from 'next/server'; import { withDeploymentAuth } from '@/lib/api/with-auth'; import { healthMonitorService } from '@/services/health-monitor.service'; +import { VercelService } from '@/services/vercel.service'; + +const vercelService = new VercelService(); export const GET = withDeploymentAuth(async (_req: NextRequest, { params }) => { try { const health = await healthMonitorService.checkDeploymentHealth(params.id); - return NextResponse.json(health); + return NextResponse.json({ + ...health, + circuitState: vercelService.breaker.currentState, + }); } catch (error: any) { console.error('Error checking deployment health:', error); return NextResponse.json(