diff --git a/PULL_REQUEST_TEMPLATE.md b/PULL_REQUEST_TEMPLATE.md index ff4fc83..ff37070 100644 --- a/PULL_REQUEST_TEMPLATE.md +++ b/PULL_REQUEST_TEMPLATE.md @@ -14,4 +14,5 @@ What code changes have been made to achieve the intent. - [ ] Code is formatted correctly (`npm run lint:fix`). - [ ] All unit tests are passing (`npm test`). +- [ ] All `sasjs-tests` unit tests are passing (`npm test`). - [ ] All `sasjs-tests` are passing (instructions available [here](https://github.com/sasjs/adapter/blob/master/sasjs-tests/README.md)). diff --git a/src/SASViyaApiClient.ts b/src/SASViyaApiClient.ts index 6453698..b002a3f 100644 --- a/src/SASViyaApiClient.ts +++ b/src/SASViyaApiClient.ts @@ -164,9 +164,9 @@ export class SASViyaApiClient { for (const promise of promises) results.push(await promise()) results.forEach((result: any, index: number) => { - if (result && result.body && result.body.details) { + if (result && result.error && result.error.details) { try { - const resultParsed = JSON.parse(result.body.details) + const resultParsed = result.error.details if (resultParsed && resultParsed.body) { let sysUserId = ''