Debug: surface detailed voice send errors
This commit is contained in:
@@ -260,8 +260,9 @@ struct DebugSettings: View {
|
|||||||
self.debugSendStatus = "Forwarded via \(trimmedTarget). Await reply."
|
self.debugSendStatus = "Forwarded via \(trimmedTarget). Await reply."
|
||||||
self.debugSendError = nil
|
self.debugSendError = nil
|
||||||
case let .failure(error):
|
case let .failure(error):
|
||||||
self.debugSendStatus = "Target: \(config.target)" + (config.identityPath.isEmpty ? "" : " · identity: \(config.identityPath)")
|
let detail = error.localizedDescription.trimmingCharacters(in: .whitespacesAndNewlines)
|
||||||
self.debugSendError = error.localizedDescription
|
self.debugSendStatus = "Forward failed: \(detail)"
|
||||||
|
self.debugSendError = nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
@@ -286,15 +287,20 @@ struct DebugSettings: View {
|
|||||||
self.debugSendStatus = "Sent locally via voice wake path."
|
self.debugSendStatus = "Sent locally via voice wake path."
|
||||||
self.debugSendError = nil
|
self.debugSendError = nil
|
||||||
} else {
|
} else {
|
||||||
self.debugSendStatus = "Local voice wake send failed"
|
let reason = rpcResult.error?.trimmingCharacters(in: .whitespacesAndNewlines)
|
||||||
self.debugSendError = rpcResult.error ?? "Unknown error"
|
let detail = (reason?.isEmpty == false)
|
||||||
|
? reason!
|
||||||
|
: "No error returned. Check /tmp/clawdis.log or rpc output."
|
||||||
|
self.debugSendStatus = "Local send failed: \(detail)"
|
||||||
|
self.debugSendError = nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch {
|
} catch {
|
||||||
await MainActor.run {
|
await MainActor.run {
|
||||||
self.debugSendInFlight = false
|
self.debugSendInFlight = false
|
||||||
self.debugSendStatus = "Local voice wake send failed"
|
let detail = error.localizedDescription.trimmingCharacters(in: .whitespacesAndNewlines)
|
||||||
self.debugSendError = error.localizedDescription
|
self.debugSendStatus = "Local send failed: \(detail)"
|
||||||
|
self.debugSendError = nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user