sauce-connect-launcher
Advanced tools
Comparing version 0.9.1 to 0.9.2
@@ -220,2 +220,12 @@ var | ||
error, | ||
handleError = function (data) { | ||
if (data.indexOf("Not authorized") !== -1 && !error) { | ||
logger("Invalid Sauce Connect Credentials"); | ||
error = new Error("Invalid Sauce Connect Credentials. " + data); | ||
} else if (data.indexOf("HTTP response code indicated failure") === -1) { | ||
// sc says the above before it says "Not authorized", but the following | ||
// Error: message is more useful | ||
error = new Error(data); | ||
} | ||
}, | ||
dataActions = { | ||
@@ -229,12 +239,4 @@ "Please wait for 'you may start your tests' to start your tests": function connecting() { | ||
}, | ||
"Error: ": function handleError(data) { | ||
if (data.indexOf("Not authorized") !== -1 && !error) { | ||
logger("Invalid Sauce Connect Credentials"); | ||
error = new Error("Invalid Sauce Connect Credentials. " + data); | ||
} else if (data.indexOf("HTTP response code indicated failure") === -1) { | ||
// sc says the above before it says "Not authorized", but the following | ||
// Error: message is more useful | ||
error = new Error(data); | ||
} | ||
}, | ||
"Error: ": handleError, | ||
"{\"error\":": handleError, | ||
"Goodbye.": function shutDown() { | ||
@@ -241,0 +243,0 @@ |
{ | ||
"name": "sauce-connect-launcher", | ||
"description": "A library to download and launch Sauce Connect.", | ||
"version": "0.9.1", | ||
"version": "0.9.2", | ||
"homepage": "https://github.com/bermi/sauce-connect-launcher", | ||
@@ -6,0 +6,0 @@ "author": "Bermi Ferrer <bermi@bermilabs.com>", |
@@ -157,2 +157,4 @@ # sauce-connect-launcher | ||
### v0.9.2 | ||
- Handling errors reported as JSON (#43) | ||
@@ -159,0 +161,0 @@ ### v0.9.1 |
24140
442
246