snyk 1.1015.0 → 1.1016.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -181815,8 +181815,15 @@ function getMavenPackageInfo(sha1, targetPath) {
181815
181815
  if (err) {
181816
181816
  reject(err);
181817
181817
  }
181818
- if (!res || !res.response || res.response.docs.length === 0) {
181819
- reject(new Error(`No package found querying '${MAVEN_SEARCH_URL}' for sha1 hash '${sha1}'.`));
181818
+ if (!res || !res.response) {
181819
+ reject(new Error(`Unexpected result querying '${MAVEN_SEARCH_URL}' for sha1 hash '${sha1}'.`));
181820
+ }
181821
+ if (res.response.docs.length === 0) {
181822
+ resolve({
181823
+ g: 'unknown',
181824
+ a: `${targetPath}:${sha1}`,
181825
+ v: 'unknown',
181826
+ });
181820
181827
  }
181821
181828
  if (res.response.docs.length > 1) {
181822
181829
  const sha1Target = path.parse(targetPath).base;