From c55e1ff6b7535cfa92b5101615e0467a15a03ceb Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Tue, 15 Dec 2015 00:23:57 -0800 Subject: [PATCH] debug output the error --- src/certificates.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/certificates.js b/src/certificates.js index d1af2d420..1fdb8eaa8 100644 --- a/src/certificates.js +++ b/src/certificates.js @@ -230,7 +230,10 @@ function ensureCertificate(domain, callback) { debug('ensureCertificate: getting certificate for %s', domain); api.getCertificate(domain, function (error, certFilePath, keyFilePath) { - if (error) return callback(null, 'cert/host.cert', 'cert/host.key'); // use fallback certs + if (error) { + debug('ensureCertificate: could not get certificate. using fallback certs', error); + return callback(null, 'cert/host.cert', 'cert/host.key'); // use fallback certs + } callback(null, certFilePath, keyFilePath); });