mirror of
https://github.com/sasjs/adapter.git
synced 2026-01-16 08:30:07 +00:00
fix: parse the logs before appending the request to request array when server type is sasjs
This commit is contained in:
@@ -169,19 +169,27 @@ 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
|
||||||
if (this.serverType === ServerType.Sasjs) {
|
? {
|
||||||
if (res.result._webout.length < 1)
|
result: res.result._webout,
|
||||||
throw new JobExecutionError(
|
log: parsedSasjsServerLog
|
||||||
0,
|
}
|
||||||
'Job execution failed',
|
: res
|
||||||
parsedSasjsServerLog
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
this.requestClient!.appendRequest(resObj, sasJob, config.debug)
|
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
|
let jsonResponse = res.result
|
||||||
|
|
||||||
if (config.debug) {
|
if (config.debug) {
|
||||||
|
|||||||
Reference in New Issue
Block a user