debug output the error

This commit is contained in:
Girish Ramakrishnan
2015-12-15 00:23:57 -08:00
parent 4bd88e1220
commit c55e1ff6b7
+4 -1
View File
@@ -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);
});