diff --git a/pkg/crawlers/azure/azure.go b/pkg/crawlers/azure/azure.go index 5eb3289..1ae0759 100644 --- a/pkg/crawlers/azure/azure.go +++ b/pkg/crawlers/azure/azure.go @@ -279,9 +279,12 @@ func (c *azureNetworkCrawler) fetchAll() ([][]byte, error) { jsonURLs := make([]string, 0, len(c.urls)) for _, url := range c.urls { jsonURL, err := c.redirectToJSONURL(url) - if err != nil || jsonURL == "" { + if err != nil { return nil, errors.Wrapf(err, "failed to crawl Azure with URL: %s. Error: %v. JSON URL: %s", url, err, jsonURL) } + if jsonURL == "" { + return nil, errors.Errorf("failed to crawl Azure with URL: %s, empty JSON URL returned. This could indicate Azure's services are unavailable", url) + } log.Printf("Received Azure network JSON URL: %s", jsonURL) jsonURLs = append(jsonURLs, jsonURL) }