feat: log BACKEND_URL at frontend startup and include target URL in proxy errors

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
Agent-Logs-Url: https://github.com/christianlouis/pop_puller_to_gmail/sessions/131238a2-437c-4a85-b98b-fcb3d80e69e0
This commit is contained in:
copilot-swe-agent[bot]
2026-03-24 01:51:50 +00:00
parent 2cd0b0c6a7
commit 88b7afb195
4 changed files with 7 additions and 1 deletions
+1 -1
View File
@@ -29,7 +29,7 @@ async function handler(request: NextRequest, context: RouteContext) {
headers: upstream.headers,
});
} catch (error) {
console.error("Proxy error forwarding to backend:", error);
console.error(`Proxy error forwarding to backend (target: ${targetUrl}):`, error);
return NextResponse.json({ detail: "Backend unavailable" }, { status: 502 });
}
}
+4
View File
@@ -0,0 +1,4 @@
export async function register() {
const backendUrl = process.env.BACKEND_URL ?? "http://localhost:8000";
console.log(`[proxy] BACKEND_URL = ${backendUrl}`);
}