mockserver-client
Advanced tools
Comparing version 5.2.0 to 5.2.1
{ | ||
"name": "mockserver-client", | ||
"description": "A node client for the MockServer", | ||
"version": "5.2.0", | ||
"version": "5.2.1", | ||
"homepage": "https://github.com/jamesdbloom/mockserver", | ||
@@ -40,3 +40,3 @@ "author": { | ||
"karma-xvfb-chrome-launcher": "0.0.1", | ||
"mockserver-node": "5.2.0", | ||
"mockserver-node": "5.2.1", | ||
"nodeunit": "~0.11" | ||
@@ -43,0 +43,0 @@ }, |
@@ -175,2 +175,3 @@ # mockserver-client-node | ||
2017-12-10 | v5.2.0 | Upgrading MockServer to 5.2.0 | ||
2017-12-11 | v5.2.1 | Improved error output + upgrade to 5.2.1 | ||
@@ -177,0 +178,0 @@ --- |
@@ -26,2 +26,3 @@ /* | ||
var sendRequest = function (host, port, path, jsonBody, resolveCallback) { | ||
var deferred = defer(); | ||
@@ -54,6 +55,3 @@ | ||
if (response.statusCode >= 400 && response.statusCode < 600) { | ||
deferred.reject({ | ||
statusCode: response.statusCode, | ||
body: data | ||
}); | ||
deferred.reject(data); | ||
} else { | ||
@@ -70,3 +68,7 @@ deferred.resolve({ | ||
req.once('error', function (error) { | ||
deferred.reject(error); | ||
if (error.code && error.code === "ECONNREFUSED") { | ||
deferred.reject("Can't connect to MockServer running on host: \"" + host + "\" and port: \"" + port + "\""); | ||
} else { | ||
deferred.reject(JSON.stringify(error)); | ||
} | ||
}); | ||
@@ -73,0 +75,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
489843
35
9785
182