Skip to content

A self-hosted dashboard that puts all your feeds in one place

Use fmt.Errorf instead

Svilen Markov0612dc6f890f
diff --git a/internal/glance/widget-custom-api.go b/internal/glance/widget-custom-api.go
index 3c58b7e..2d9ea3c 100644
--- a/internal/glance/widget-custom-api.go
+++ b/internal/glance/widget-custom-api.go
@@ -213,7 +213,7 @@ func fetchCustomAPIRequest(ctx context.Context, req *CustomAPIRequest) (*customA
return nil, errors.New("invalid response JSON")
}
- return nil, errors.New(fmt.Sprintf("%d %s", resp.StatusCode, http.StatusText(resp.StatusCode)))
+ return nil, fmt.Errorf("%d %s", resp.StatusCode, http.StatusText(resp.StatusCode))
}