1
0
mirror of https://github.com/sasjs/adapter.git synced 2026-01-09 13:30:04 +00:00

Merge pull request #602 from sasjs/hot-fix-sasjs-server

fix: response from SASJS Server with/without debug on
This commit is contained in:
Allan Bowe
2021-12-15 17:42:29 +00:00
committed by GitHub

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(