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

Merge pull request #676 from sasjs/issue-675

fix: no need to stringify res/err in sas9JobExecutor before appending…
This commit is contained in:
Allan Bowe
2022-03-10 14:06:50 +02:00
committed by GitHub

View File

@@ -85,25 +85,13 @@ export class Sas9JobExecutor extends BaseJobExecutor {
} }
) )
.then((res: any) => { .then((res: any) => {
let resString = res //appending response to requests array that will be used for requests history reference
this.requestClient!.appendRequest(res, sasJob, config.debug)
if (typeof res === 'object') {
resString = JSON.stringify(res)
}
this.requestClient!.appendRequest(resString, sasJob, config.debug)
return res return res
}) })
.catch((err: any) => { .catch((err: any) => {
let errString = err //appending error to requests array that will be used for requests history reference
this.requestClient!.appendRequest(err, sasJob, config.debug)
if (typeof err === 'object') {
errString = JSON.stringify(errString)
}
this.requestClient!.appendRequest(errString, sasJob, config.debug)
return err return err
}) })
} }