1
0
mirror of https://github.com/sasjs/adapter.git synced 2026-01-17 00:50:05 +00:00

Merge pull request #719 from sasjs/issue-718

fix: parse the logs before appending the request to request array whe…
This commit is contained in:
Allan Bowe
2022-06-20 17:53:44 +02:00
committed by GitHub

View File

@@ -169,13 +169,21 @@ export class WebJobExecutor extends BaseJobExecutor {
? res.result.log.map((logLine: any) => logLine.line).join('\n') ? res.result.log.map((logLine: any) => logLine.line).join('\n')
: res.result.log : 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 (
if (res.result._webout.length < 1) this.serverType === ServerType.Sasjs &&
res.result._webout.length < 1
) {
throw new JobExecutionError( throw new JobExecutionError(
0, 0,
'Job execution failed', `No webout was returned by job ${program}. Server type is SASJS and the calling function is WebJobExecutor. Please check the SAS log for more info.`,
parsedSasjsServerLog parsedSasjsServerLog
) )
} }