1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00

Refactor a number of widgets to display client errors

Rather than swallowing or crashing, display appropriate errors
This commit is contained in:
Sean Smith
2019-09-01 13:19:07 -04:00
parent ff77a3deb0
commit 8835f532cc
12 changed files with 83 additions and 60 deletions

View File

@@ -36,13 +36,9 @@ func (widget *Widget) Refresh() {
teams, err := Fetch(widget.settings.apiID, widget.settings.apiKey)
if err != nil {
widget.err = err
widget.teams = nil
} else {
widget.err = nil
widget.teams = teams
}
widget.err = err
widget.teams = teams
widget.Redraw(widget.content)
}