feat: automatically attach recent dev server logs to failed start responses to eliminate AI telemetry gaps
This commit is contained in:
@@ -5241,11 +5241,19 @@ async function toolDevServerStart(
|
||||
}
|
||||
|
||||
if (!isHealthy) {
|
||||
let recentLogs = "";
|
||||
try {
|
||||
recentLogs = await tailDevServerLog(project.id, row.id, 50);
|
||||
} catch (logErr: any) {
|
||||
recentLogs = `Failed to retrieve logs: ${logErr.message || String(logErr)}`;
|
||||
}
|
||||
|
||||
return NextResponse.json({
|
||||
result: {
|
||||
ok: false,
|
||||
error:
|
||||
"Server failed to start or bind to port within the timeout window.",
|
||||
logs: recentLogs,
|
||||
healthCheck: {
|
||||
status: 500,
|
||||
output: failureOutput,
|
||||
|
||||
Reference in New Issue
Block a user