1
0
mirror of https://github.com/sasjs/adapter.git synced 2025-12-11 09:24:35 +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) => {
let resString = res
if (typeof res === 'object') {
resString = JSON.stringify(res)
}
this.requestClient!.appendRequest(resString, sasJob, config.debug)
//appending response to requests array that will be used for requests history reference
this.requestClient!.appendRequest(res, sasJob, config.debug)
return res
})
.catch((err: any) => {
let errString = err
if (typeof err === 'object') {
errString = JSON.stringify(errString)
}
this.requestClient!.appendRequest(errString, sasJob, config.debug)
//appending error to requests array that will be used for requests history reference
this.requestClient!.appendRequest(err, sasJob, config.debug)
return err
})
}