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:
@@ -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 });
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
export async function register() {
|
||||
const backendUrl = process.env.BACKEND_URL ?? "http://localhost:8000";
|
||||
console.log(`[proxy] BACKEND_URL = ${backendUrl}`);
|
||||
}
|
||||
Reference in New Issue
Block a user