diff --git a/lib/primary.js b/lib/primary.js
index 5f7a29188c09c5fe7d5f19f1e997d29907224ffe..67d8cf6dd66a4c1c04968a25a7c40a865a9a1c2d 100644
--- a/lib/primary.js
+++ b/lib/primary.js
@@ -97,13 +97,12 @@ var getWellKnown = function (domain, cb) {
   function handleResponse(res) {
     var msg;
     if (res.statusCode !== 200) {
-      logger.debug(' is not a browserid primary - non-200 response code to ' + WELL_KNOWN_URL);
-      return cb("can't get public key for " + domain);
+      logger.debug(domain + ' is not a browserid primary - non-200 response code to ' + WELL_KNOWN_URL);
+      return cb(null, false, null);
     }
     if (res.headers['content-type'].indexOf('application/json') !== 0) {
-      msg = domain + ' is not a browserid primary - non "application/json" response to ' + WELL_KNOWN_URL
-      logger.debug(msg);
-      return cb(msg);
+      logger.debug(domain + ' is not a browserid primary - non "application/json" response to ' + WELL_KNOWN_URL);
+      return cb(null, false, null);
     }
 
     var body = "";
@@ -152,14 +151,16 @@ var getWellKnown = function (domain, cb) {
   }
 
   req.on('error', function(e) {
-    var msg = domain + ' is not a browserid primary: ' + e.toString();
-    logger.debug(msg);
-    cb(msg);
+    logger.debug(domain + ' is not a browserid primary: ' + e.toString());
+    cb(null, false, null);
   });
 };
 
 exports.getPublicKey = function(domain, cb) {
   exports.checkSupport(domain, function(err, urls, publicKey) {
+    if (publicKey === null) {
+      return cb("can't get public key for " + domain);
+    }
     cb(err, publicKey);
   });
 };