mirror of
https://github.com/sasjs/adapter.git
synced 2026-01-05 11:40:06 +00:00
fix: compute api log not appended to sasjs requests
This commit is contained in:
@@ -606,12 +606,10 @@ export class SASViyaApiClient {
|
|||||||
throw err
|
throw err
|
||||||
})
|
})
|
||||||
|
|
||||||
return Promise.reject(
|
return Promise.reject({
|
||||||
new ErrorResponse('Job execution failed.', {
|
status: 500,
|
||||||
status: 500,
|
log: log
|
||||||
body: log
|
})
|
||||||
})
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
|
|||||||
12
src/SASjs.ts
12
src/SASjs.ts
@@ -895,8 +895,8 @@ export default class SASjs {
|
|||||||
|
|
||||||
return responseJson
|
return responseJson
|
||||||
})
|
})
|
||||||
.catch(async (e) => {
|
.catch(async (response) => {
|
||||||
if (needsRetry(JSON.stringify(e))) {
|
if (needsRetry(JSON.stringify(response))) {
|
||||||
if (this.retryCountJeseApi < requestRetryLimit) {
|
if (this.retryCountJeseApi < requestRetryLimit) {
|
||||||
let retryResponse = await this.executeJobViaJesApi(
|
let retryResponse = await this.executeJobViaJesApi(
|
||||||
sasJob,
|
sasJob,
|
||||||
@@ -917,11 +917,11 @@ export default class SASjs {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e?.log) {
|
if (response?.log) {
|
||||||
this.appendSasjsRequest(e.log, sasJob, null)
|
this.appendSasjsRequest(response.log, sasJob, null)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e.toString().includes('Job was not found')) {
|
if (response.toString().includes('Job was not found')) {
|
||||||
reject(
|
reject(
|
||||||
new ErrorResponse('Service not found on the server.', {
|
new ErrorResponse('Service not found on the server.', {
|
||||||
sasJob: sasJob
|
sasJob: sasJob
|
||||||
@@ -929,7 +929,7 @@ export default class SASjs {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
reject(new ErrorResponse('Job execution failed.', e))
|
reject(new ErrorResponse('Job execution failed.', response))
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user