mirror of
https://github.com/sasjs/adapter.git
synced 2026-01-15 16:10:06 +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:
@@ -169,15 +169,23 @@ 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 &&
|
||||||
throw new JobExecutionError(
|
res.result._webout.length < 1
|
||||||
0,
|
) {
|
||||||
'Job execution failed',
|
throw new JobExecutionError(
|
||||||
parsedSasjsServerLog
|
0,
|
||||||
)
|
`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
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
this.requestClient!.appendRequest(resObj, sasJob, config.debug)
|
this.requestClient!.appendRequest(resObj, sasJob, config.debug)
|
||||||
|
|||||||
Reference in New Issue
Block a user