mirror of
https://github.com/sasjs/adapter.git
synced 2026-01-05 11:40:06 +00:00
fix(logs): fetch log only when debug is switched on
This commit is contained in:
@@ -301,11 +301,12 @@ export class SASViyaApiClient {
|
|||||||
{ headers }
|
{ headers }
|
||||||
)
|
)
|
||||||
|
|
||||||
let jobResult, log
|
let jobResult
|
||||||
|
let log
|
||||||
|
|
||||||
const logLink = currentJob.links.find((l) => l.rel === 'log')
|
const logLink = currentJob.links.find((l) => l.rel === 'log')
|
||||||
|
|
||||||
if (true && logLink) {
|
if (debug && logLink) {
|
||||||
log = await this.request<any>(
|
log = await this.request<any>(
|
||||||
`${this.serverUrl}${logLink.href}/content?limit=10000`,
|
`${this.serverUrl}${logLink.href}/content?limit=10000`,
|
||||||
{
|
{
|
||||||
@@ -317,7 +318,7 @@ export class SASViyaApiClient {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (jobStatus === 'failed' || jobStatus === 'error') {
|
if (jobStatus === 'failed' || jobStatus === 'error') {
|
||||||
return Promise.reject({ error: currentJob.error, log: log })
|
return Promise.reject({ error: currentJob.error, log })
|
||||||
}
|
}
|
||||||
const resultLink = `/compute/sessions/${executionSessionId}/filerefs/_webout/content`
|
const resultLink = `/compute/sessions/${executionSessionId}/filerefs/_webout/content`
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user