From ed9f2bdcaefbcaca0966a6af79f3a0e67c169638 Mon Sep 17 00:00:00 2001
From: Rhys Arkins <rhys@arkins.net>
Date: Wed, 29 Apr 2020 07:45:25 +0200
Subject: [PATCH] fix(docker): gracefully handle ERR_TLS_CERT_ALTNAME_INVALID

---
 lib/datasource/docker/index.ts | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/lib/datasource/docker/index.ts b/lib/datasource/docker/index.ts
index f1b425829c..d2356a6c99 100644
--- a/lib/datasource/docker/index.ts
+++ b/lib/datasource/docker/index.ts
@@ -578,12 +578,11 @@ async function getLabels(
         },
         'docker registry failure: internal error'
       );
-    } else if (err.code === 'ETIMEDOUT') {
-      logger.debug(
-        { registry },
-        'Timeout when attempting to connect to docker registry'
-      );
-      logger.debug({ err });
+    } else if (
+      err.code === 'ERR_TLS_CERT_ALTNAME_INVALID' ||
+      err.code === 'ETIMEDOUT'
+    ) {
+      logger.debug({ registry, err }, 'Error connecting to docker registry');
     } else if (registry === 'https://quay.io') {
       // istanbul ignore next
       logger.debug(
-- 
GitLab