throw error if url is absent

This commit is contained in:
AJ ONeal 2015-12-16 09:48:34 +00:00
parent 289eaf9cf5
commit 57eab66a4d
1 changed files with 3 additions and 0 deletions

View File

@ -10,6 +10,9 @@ module.exports.create = function (deps) {
var knownUrls = deps.LeCore.knownEndpoints; var knownUrls = deps.LeCore.knownEndpoints;
function getAcmeUrls(acmeDiscoveryUrl, cb) { function getAcmeUrls(acmeDiscoveryUrl, cb) {
if ('string' !== typeof acmeDiscoveryUrl) {
cb(new Error("getAcmeUrls: acmeDiscoveryUrl must be a string"));
}
// TODO check response header on request for cache time // TODO check response header on request for cache time
return request({ return request({