mirror of
https://github.com/sasjs/adapter.git
synced 2026-01-03 18:50:05 +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
|
||||
})
|
||||
|
||||
return Promise.reject(
|
||||
new ErrorResponse('Job execution failed.', {
|
||||
status: 500,
|
||||
body: log
|
||||
})
|
||||
)
|
||||
return Promise.reject({
|
||||
status: 500,
|
||||
log: log
|
||||
})
|
||||
}
|
||||
}
|
||||
return {
|
||||
|
||||
12
src/SASjs.ts
12
src/SASjs.ts
@@ -895,8 +895,8 @@ export default class SASjs {
|
||||
|
||||
return responseJson
|
||||
})
|
||||
.catch(async (e) => {
|
||||
if (needsRetry(JSON.stringify(e))) {
|
||||
.catch(async (response) => {
|
||||
if (needsRetry(JSON.stringify(response))) {
|
||||
if (this.retryCountJeseApi < requestRetryLimit) {
|
||||
let retryResponse = await this.executeJobViaJesApi(
|
||||
sasJob,
|
||||
@@ -917,11 +917,11 @@ export default class SASjs {
|
||||
}
|
||||
}
|
||||
|
||||
if (e?.log) {
|
||||
this.appendSasjsRequest(e.log, sasJob, null)
|
||||
if (response?.log) {
|
||||
this.appendSasjsRequest(response.log, sasJob, null)
|
||||
}
|
||||
|
||||
if (e.toString().includes('Job was not found')) {
|
||||
if (response.toString().includes('Job was not found')) {
|
||||
reject(
|
||||
new ErrorResponse('Service not found on the server.', {
|
||||
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