Browse Source

Add missing error check

Brendan Abolivier 6 years ago
parent
commit
0025d65d89
Signed by: Brendan Abolivier <contact@brendanabolivier.com> GPG key ID: 8EF1500759F70623
1 changed files with 3 additions and 0 deletions
  1. 3
    0
      src/grafana/dashboards.go

+ 3
- 0
src/grafana/dashboards.go View File

@@ -72,6 +72,9 @@ func (d *Dashboard) UnmarshalJSON(b []byte) (err error) {
72 72
 // response body.
73 73
 func (c *Client) GetDashboardsURIs() (URIs []string, err error) {
74 74
 	resp, err := c.request("GET", "search", nil)
75
+	if err != nil {
76
+		return
77
+	}
75 78
 
76 79
 	var respBody []dbSearchResponse
77 80
 	if err = json.Unmarshal(resp, &respBody); err != nil {