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:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user