jsf.js_next_gen 4.0.5-beta.6 → 4.0.5-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/window/faces-development.js +12 -7
- package/dist/window/faces-development.js.map +1 -1
- package/dist/window/faces.js +1 -1
- package/dist/window/faces.js.map +1 -1
- package/dist/window/jsf-development.js +12 -7
- package/dist/window/jsf-development.js.map +1 -1
- package/dist/window/jsf.js +1 -1
- package/dist/window/jsf.js.map +1 -1
- package/package.json +1 -1
- package/src/main/typescript/impl/xhrCore/XhrRequest.ts +11 -7
- package/src/main/typescript/test/xhrCore/RequestTest.spec.ts +33 -0
- package/target/impl/xhrCore/XhrRequest.js +12 -7
- package/target/impl/xhrCore/XhrRequest.js.map +1 -1
- package/target/test/xhrCore/RequestTest.spec.js +33 -0
- package/target/test/xhrCore/RequestTest.spec.js.map +1 -1
|
@@ -8362,30 +8362,35 @@ class XhrRequest extends AsyncRunnable_1.AsyncRunnable {
|
|
|
8362
8362
|
}
|
|
8363
8363
|
}
|
|
8364
8364
|
processRequestErrors(resolve) {
|
|
8365
|
-
var _a, _b, _c;
|
|
8365
|
+
var _a, _b, _c, _d, _e;
|
|
8366
8366
|
const responseXML = new mona_dish_1.XMLQuery((_a = this.xhrObject) === null || _a === void 0 ? void 0 : _a.responseXML);
|
|
8367
|
-
const
|
|
8367
|
+
const responseText = (_c = (_b = this.xhrObject) === null || _b === void 0 ? void 0 : _b.responseText) !== null && _c !== void 0 ? _c : "";
|
|
8368
|
+
const responseCode = (_e = (_d = this.xhrObject) === null || _d === void 0 ? void 0 : _d.status) !== null && _e !== void 0 ? _e : -1;
|
|
8368
8369
|
if (responseXML.isXMLParserError()) {
|
|
8369
|
-
//
|
|
8370
|
+
// Firefox: malformed XML produces a Document with <parsererror>
|
|
8371
|
+
const errorName = "Invalid Response";
|
|
8372
|
+
const errorMessage = "The response xml is invalid";
|
|
8373
|
+
this.handleGenericResponseError(errorName, errorMessage, Const_1.MALFORMEDXML, resolve);
|
|
8374
|
+
return true;
|
|
8375
|
+
}
|
|
8376
|
+
else if (responseXML.isAbsent() && responseText.trim().length > 0) {
|
|
8377
|
+
// Chrome: responseXML is null for unparseable XML, but responseText has content
|
|
8370
8378
|
const errorName = "Invalid Response";
|
|
8371
8379
|
const errorMessage = "The response xml is invalid";
|
|
8372
8380
|
this.handleGenericResponseError(errorName, errorMessage, Const_1.MALFORMEDXML, resolve);
|
|
8373
8381
|
return true;
|
|
8374
8382
|
}
|
|
8375
8383
|
else if (responseXML.isAbsent()) {
|
|
8376
|
-
// empty response
|
|
8384
|
+
// Truly empty response
|
|
8377
8385
|
const errorName = "Empty Response";
|
|
8378
8386
|
const errorMessage = "The response has provided no data";
|
|
8379
8387
|
this.handleGenericResponseError(errorName, errorMessage, Const_1.EMPTY_RESPONSE, resolve);
|
|
8380
8388
|
return true;
|
|
8381
8389
|
}
|
|
8382
8390
|
else if (responseCode >= 300 || responseCode < 200) {
|
|
8383
|
-
// other server errors
|
|
8384
|
-
// all errors from the server are resolved without interfering in the queue
|
|
8385
8391
|
this.handleHttpError(resolve);
|
|
8386
8392
|
return true;
|
|
8387
8393
|
}
|
|
8388
|
-
//additional errors are application errors and must be handled within the response
|
|
8389
8394
|
return false;
|
|
8390
8395
|
}
|
|
8391
8396
|
handleGenericResponseError(errorName, errorMessage, responseStatus, resolve) {
|