1
0
Fork 0

raise an error if setup/cleanup calls don't work

This commit is contained in:
Wilfried Goesgens 2017-03-15 10:45:15 +01:00
parent f18ad19a30
commit 8a8e104ca4
1 changed files with 5 additions and 1 deletions

View File

@ -112,7 +112,11 @@ var logCurlRequest = function () {
var swallowText = function () {};
var curlRequestRaw = internal.appendCurlRequest(swallowText, swallowText, swallowText);
var curlRequest = function () {
return curlRequestRaw.apply(curlRequestRaw, arguments);
rc = curlRequestRaw.apply(curlRequestRaw, arguments);
if (rc.code != 200) {
throw rc.code + " " + rc.errorMessage
}
return rc
};
var logJsonResponse = internal.appendJsonResponse(rawAppender, jsonAppender);
var logHtmlResponse = internal.appendRawResponse(rawAppender, htmlAppender);