Comparing version 0.10.1 to 0.10.2
@@ -33,2 +33,11 @@ /*jslint node: true */ | ||
var getMessageFromRefreshToAccess = function(results) { | ||
if (results.body) { | ||
if (results.body.errors) { | ||
return results.body.errors; | ||
} | ||
} | ||
return 'Bad response received, please check API URL.'; | ||
} | ||
var log = function(section, msg, options){ | ||
@@ -625,7 +634,6 @@ if(options.debug){ | ||
if(err){ | ||
// [AM] - This is when we get a 500, which is (in ALKS Core) a bad refresh token. Should pass this error to the CLI. | ||
return callback("Error: Refresh token expired. Please try to use the logout2fa and login2fa commands."); | ||
return callback(err); | ||
} | ||
else if(results.statusCode !== 200){ | ||
return callback(new Error(getMessageFromBadResponse(results))); | ||
return callback(new Error(getMessageFromRefreshToAccess(results))); | ||
} | ||
@@ -632,0 +640,0 @@ |
{ | ||
"name": "alks-node", | ||
"version": "0.10.1", | ||
"version": "0.10.2", | ||
"description": "Node client for ALKS", | ||
@@ -5,0 +5,0 @@ "main": "lib/alks-api.js", |
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
32831
574
0