1
0
mirror of https://github.com/sasjs/adapter.git synced 2025-12-11 01:14:36 +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,19 +169,27 @@ export class WebJobExecutor extends BaseJobExecutor {
? res.result.log.map((logLine: any) => logLine.line).join('\n')
: res.result.log
const resObj = res
if (this.serverType === ServerType.Sasjs) {
if (res.result._webout.length < 1)
throw new JobExecutionError(
0,
'Job execution failed',
parsedSasjsServerLog
)
}
const resObj =
this.serverType === ServerType.Sasjs
? {
result: res.result._webout,
log: parsedSasjsServerLog
}
: res
this.requestClient!.appendRequest(resObj, sasJob, config.debug)
if (
this.serverType === ServerType.Sasjs &&
res.result._webout.length < 1
) {
throw new JobExecutionError(
0,
'Job execution failed',
parsedSasjsServerLog
)
}
let jsonResponse = res.result
if (config.debug) {