1
0
mirror of https://github.com/sasjs/adapter.git synced 2025-12-11 01:14:36 +00:00

chore(*): clean up, handle debug responses

This commit is contained in:
Krishna Acondy
2021-02-04 09:42:39 +00:00
parent 8edb00f869
commit 613cc6b9ef
6 changed files with 125 additions and 169 deletions

View File

@@ -90,8 +90,13 @@ export abstract class BaseJobExecutor implements JobExecutor {
}
}
const stringifiedResult =
typeof response?.result === 'string'
? response?.result
: JSON.stringify(response?.result, null, 2)
this.requests.push({
logFile: response?.log || response?.result || response,
logFile: response?.log || stringifiedResult || response,
serviceLink: program,
timestamp: new Date(),
sourceCode,