feat: surface error on mediaserver start

This commit is contained in:
Rob Watson 2025-02-13 23:00:03 +01:00
parent a5516d55a5
commit 08fad2470a

View File

@ -173,16 +173,16 @@ func (s *Actor) actorLoop(containerStateC <-chan domain.Container, errC <-chan e
fetchStateT.Stop()
// TODO: surface better error from container
if s.state.Container.ExitCode != nil {
s.state.ExitReason = fmt.Sprintf("Server process exited with code %d", *s.state.Container.ExitCode)
s.state.ExitReason = fmt.Sprintf("Server process exited with code %d.", *s.state.Container.ExitCode)
} else {
s.state.ExitReason = "Server process exited unexpectedly"
s.state.ExitReason = "Server process exited unexpectedly."
}
if err != nil {
s.state.ExitReason += "\n\n" + err.Error()
}
if s.state.Live {
s.state.Live = false
}
s.state.Live = false
sendState()
case <-fetchStateT.C: