Skip to content

Commit

Permalink
Fix error handling in GUI
Browse files Browse the repository at this point in the history
Use the Info field instead of the Data field for error messages.
Otherwise the GUI code tries to treat the message as DSL data and breaks
as a result.
  • Loading branch information
janh committed May 17, 2024
1 parent c88c7c2 commit e2dd425
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/gui/gui.go
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ func connect(cfg json.RawMessage, remember bool) {
if err != nil {
msg := common.Message{
State: string(common.StateError),
Data: "parsing error: " + err.Error(),
Info: "parsing error: " + err.Error(),
}
updateState(msg)
return
Expand All @@ -373,7 +373,7 @@ func connect(cfg json.RawMessage, remember bool) {
if err != nil {
msg := common.Message{
State: string(common.StateError),
Data: "configuration error: " + err.Error(),
Info: "configuration error: " + err.Error(),
}
updateState(msg)
return
Expand All @@ -383,7 +383,7 @@ func connect(cfg json.RawMessage, remember bool) {
if err != nil {
msg := common.Message{
State: string(common.StateError),
Data: "client error: " + err.Error(),
Info: "client error: " + err.Error(),
}
updateState(msg)
return
Expand Down

0 comments on commit e2dd425

Please sign in to comment.