Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
snapshot/downloader: fix fetching snapshot URI (#1791)
When parsing the response from the artifacts-api to get the latest snapshot (https://artifacts-api.elastic.co/v1/search/%s-SNAPSHOT/elastic-agent) it could happen that an entry that is not from the Elastic-Agent (like the Elastic-Agent-Shipper) would be evaluated and it would cause the `snapshotURI` function return an error. This commit fixes it by iterating the whole map before returning an error.
- Loading branch information