@ikonintegration/ikapi 3.1.34 → 3.1.36
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/package.json
CHANGED
|
@@ -59,7 +59,9 @@ export default class IKTransaction {
|
|
|
59
59
|
if (this._resp && this._resp instanceof IKResponse) {
|
|
60
60
|
await this._resp.build(this._context, this, this._syncReturn);
|
|
61
61
|
executionFailed = !!(this._resp.getBody() && this._resp.getBody().rollback);
|
|
62
|
-
} else if (
|
|
62
|
+
} else if (this._syncReturn && this._resp) { //sync return can return other than ikresponse
|
|
63
|
+
executionFailed = false;
|
|
64
|
+
} else {
|
|
63
65
|
this._resp = this._getErrorResponse(IKGlobals.ErrorResponseInvalidServerResponse, IKGlobals.ErrorCode_APIError)
|
|
64
66
|
await this._resp.build(this._context, this, this._syncReturn);
|
|
65
67
|
this.logger.error("Invalid response object from main request code.");
|
package/src/IKEventProcessor.js
CHANGED
|
@@ -11,7 +11,7 @@ export default class IKEventProcessor {
|
|
|
11
11
|
}
|
|
12
12
|
async processEvent(execution, doNotDecodeMessage) {
|
|
13
13
|
const resp = await this._processRawEvent(execution, doNotDecodeMessage);
|
|
14
|
-
if (resp && !(resp.getCode() >= 200 && resp.getCode() < 300)) throw new Error(JSON.stringify(resp.getBody()));
|
|
14
|
+
if (!this._respondWithFailures && resp && !(resp.getCode() >= 200 && resp.getCode() < 300)) throw new Error(JSON.stringify(resp.getBody()));
|
|
15
15
|
else if (resp) return resp;
|
|
16
16
|
}
|
|
17
17
|
async _processRawEvent(execution, doNotDecodeMessage) {
|