Commits

Andreas Knecht  committed 4e6be7c Merge

Merged in jmealo/passport-atlassian-crowd/jmealo/selffail-should-return-an-error-object-1379310274014 (pull request #2)

self.fail should return an error object

  • Participants
  • Parent commits afe5c61, ef81a12

Comments (0)

Files changed (1)

File lib/passport-atlassian-crowd/strategy.js

         } else if (response.statusCode >= 400 && response.statusCode < 500) {
             var error = JSON.parse(result);
             console.log("Error retrieving groups for user '" + username + "': " + error.message + " [" + error.reason + "]");
-            return self.fail();
+            return self.fail(error);
         } else {
             return self.error(new Error("Invalid response from Crowd Server '" + self._crowdServer +
                 "' [" + response.statusCode + "]: " + result));
                 logMsg += " [" + error.reason + "]";
             }
             console.log(logMsg);
-            return self.fail();
+            return self.fail(error);
         } else {
             return self.error(new Error("Invalid response from Crowd Server '" + self._crowdServer +
                 "' [" + response.statusCode + "]: " + result));