diff --git a/services/data-manager/service/fetch/htmlDownloader.go b/services/data-manager/service/fetch/htmlDownloader.go index c12fe3d..f7936cf 100644 --- a/services/data-manager/service/fetch/htmlDownloader.go +++ b/services/data-manager/service/fetch/htmlDownloader.go @@ -17,7 +17,6 @@ package fetch import ( - "errors" "fmt" "io" "log/slog" @@ -46,7 +45,7 @@ func GetHTMLWithClient(url string, client *http.Client) (string, error) { if response.StatusCode != 200 { slog.Warn("While fetching the HTML document, the server responded with status code: ", "status", response.StatusCode) - return "", errors.New(fmt.Sprintf("Server responded with status code: %d", response.StatusCode)) + return "", fmt.Errorf("Server responded with status code: %d", response.StatusCode) } defer func(Body io.ReadCloser) {