Browse Source

Add missing error check

Brendan Abolivier 7 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
 // response body.
72
 // response body.
73
 func (c *Client) GetDashboardsURIs() (URIs []string, err error) {
73
 func (c *Client) GetDashboardsURIs() (URIs []string, err error) {
74
 	resp, err := c.request("GET", "search", nil)
74
 	resp, err := c.request("GET", "search", nil)
75
+	if err != nil {
76
+		return
77
+	}
75
 
78
 
76
 	var respBody []dbSearchResponse
79
 	var respBody []dbSearchResponse
77
 	if err = json.Unmarshal(resp, &respBody); err != nil {
80
 	if err = json.Unmarshal(resp, &respBody); err != nil {