macOS: surface stderr in health failure text
parent
0f74e372ba
commit
7b77e9f9ae
|
|
@ -118,7 +118,7 @@ final class HealthStore: ObservableObject {
|
||||||
self.lastSuccess = Date()
|
self.lastSuccess = Date()
|
||||||
self.lastError = nil
|
self.lastError = nil
|
||||||
} else {
|
} else {
|
||||||
self.lastError = self.describeFailure(from: decoded)
|
self.lastError = self.describeFailure(from: decoded, fallback: response.message)
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
@ -150,7 +150,7 @@ final class HealthStore: ObservableObject {
|
||||||
return "linked · auth \(auth) · socket ok"
|
return "linked · auth \(auth) · socket ok"
|
||||||
}
|
}
|
||||||
|
|
||||||
private func describeFailure(from snap: HealthSnapshot) -> String {
|
private func describeFailure(from snap: HealthSnapshot, fallback: String?) -> String {
|
||||||
if !snap.web.linked {
|
if !snap.web.linked {
|
||||||
return "Not linked — run clawdis login"
|
return "Not linked — run clawdis login"
|
||||||
}
|
}
|
||||||
|
|
@ -163,6 +163,9 @@ final class HealthStore: ObservableObject {
|
||||||
if !snap.ipc.exists {
|
if !snap.ipc.exists {
|
||||||
return "IPC socket missing at \(snap.ipc.path)"
|
return "IPC socket missing at \(snap.ipc.path)"
|
||||||
}
|
}
|
||||||
|
if let fallback, !fallback.isEmpty {
|
||||||
|
return fallback
|
||||||
|
}
|
||||||
return "health probe failed"
|
return "health probe failed"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue