1
0
mirror of https://github.com/sasjs/adapter.git synced 2026-01-02 02:00:06 +00:00

fix: parse the logs before appending the request to request array when server type is sasjs

This commit is contained in:
2022-06-09 23:11:47 +05:00
parent f0525c5796
commit dd6b89b0d0

View File

@@ -169,10 +169,20 @@ export class WebJobExecutor extends BaseJobExecutor {
? res.result.log.map((logLine: any) => logLine.line).join('\n')
: res.result.log
const resObj = res
const resObj =
this.serverType === ServerType.Sasjs
? {
result: res.result._webout,
log: parsedSasjsServerLog
}
: res
if (this.serverType === ServerType.Sasjs) {
if (res.result._webout.length < 1)
this.requestClient!.appendRequest(resObj, sasJob, config.debug)
if (
this.serverType === ServerType.Sasjs &&
res.result._webout.length < 1
) {
throw new JobExecutionError(
0,
'Job execution failed',
@@ -180,8 +190,6 @@ export class WebJobExecutor extends BaseJobExecutor {
)
}
this.requestClient!.appendRequest(resObj, sasJob, config.debug)
let jsonResponse = res.result
if (config.debug) {