fix: polish gateway restart diagnostics

This commit is contained in:
Shakker
2026-05-16 17:33:51 +01:00
committed by Shakker
parent 92fe2a8f5f
commit 405535d4ce
2 changed files with 3 additions and 2 deletions

View File

@@ -495,7 +495,7 @@ function classifyProbeErrorKind(error: unknown): string {
return code.trim().toLowerCase();
}
const message = (error as { message?: unknown }).message;
if (typeof message === "string" && /probe timeout/iu.test(message)) {
if (typeof message === "string" && message.toLowerCase().includes("probe timeout")) {
return "timeout";
}
const name = (error as { name?: unknown }).name;
@@ -662,7 +662,7 @@ function collectStartupTrace(line: string, startupTrace: Record<string, number>)
}
function classifyGatewayReadyLog(line: string): "gateway-ready" | "http-listen" | null {
if (/\[gateway\] http server listening \(/.test(line)) {
if (line.includes("[gateway] http server listening (")) {
return "http-listen";
}
if (/\[gateway\] ready(?:\s*\(|\s*$)/.test(line)) {