1
0
mirror of https://github.com/sasjs/adapter.git synced 2025-12-11 01:14:36 +00:00

fix: response from SASJS Server with/without debug on

This commit is contained in:
Saad Jutt
2021-12-15 21:32:02 +05:00
parent c44766ea14
commit 1ba9291746

View File

@@ -157,11 +157,6 @@ export class WebJobExecutor extends BaseJobExecutor {
let jsonResponse = res.result
if (this.serverType === ServerType.Sasjs) {
const webout = parseWeboutResponse(res.result._webout, apiUrl)
jsonResponse = getValidJson(webout)
}
if (config.debug) {
switch (this.serverType) {
case ServerType.SasViya:
@@ -177,7 +172,13 @@ export class WebJobExecutor extends BaseJobExecutor {
? parseWeboutResponse(res.result, apiUrl)
: res.result
break
case ServerType.Sasjs:
const webout = parseWeboutResponse(res.result._webout, apiUrl)
jsonResponse = getValidJson(webout)
break
}
} else if (this.serverType === ServerType.Sasjs) {
jsonResponse = getValidJson(res.result._webout)
}
const responseObject = appendExtraResponseAttributes(