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

fix(context): fixed result parsing

This commit is contained in:
Yury Shkoda
2020-11-26 13:27:35 +03:00
parent 79bb27524c
commit 71a3fe04a0

View File

@@ -154,6 +154,7 @@ export class SASViyaApiClient {
context.name, context.name,
accessToken, accessToken,
null, null,
false,
true, true,
true true
).catch((err) => err) ).catch((err) => err)
@@ -164,14 +165,12 @@ export class SASViyaApiClient {
for (const promise of promises) results.push(await promise()) for (const promise of promises) results.push(await promise())
results.forEach((result: any, index: number) => { results.forEach((result: any, index: number) => {
if (result && result.error && result.error.details) { if (result && result.log) {
try { try {
const resultParsed = result.error.details const resultParsed = result.log
if (resultParsed && resultParsed.body) {
let sysUserId = '' let sysUserId = ''
const sysUserIdLog = resultParsed.body const sysUserIdLog = resultParsed
.split('\n') .split('\n')
.find((line: string) => line.startsWith('SYSUSERID=')) .find((line: string) => line.startsWith('SYSUSERID='))
@@ -188,7 +187,6 @@ export class SASViyaApiClient {
} }
}) })
} }
}
} catch (error) { } catch (error) {
throw error throw error
} }