From a7e24d51d1f026e74d34335d678e47259d9d3fd7 Mon Sep 17 00:00:00 2001
From: Rhys Arkins <rhys@arkins.net>
Date: Thu, 18 Jul 2019 21:38:54 +0200
Subject: [PATCH] fix(docker): throw error if no manifest config

---
 lib/datasource/docker/index.js | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lib/datasource/docker/index.js b/lib/datasource/docker/index.js
index f65d9840ea..7b9a2a44f1 100644
--- a/lib/datasource/docker/index.js
+++ b/lib/datasource/docker/index.js
@@ -382,6 +382,11 @@ async function getLabels(registry, repository, tag) {
     const manifest = JSON.parse(manifestResponse.body);
     let labels = {};
     const configDigest = manifest.config.digest;
+    // istanbul ignore if
+    if (!manifest.config) {
+      logger.warn({ manifest }, 'Docker manifest error: no config');
+      throw new Error('registry-failure');
+    }
     const headers = await getAuthHeaders(registry, repository);
     if (!headers) {
       logger.info('No docker auth found - returning');
-- 
GitLab