1
0
mirror of https://github.com/sasjs/adapter.git synced 2026-01-08 21:10:05 +00:00

fix: service not found error handling

This commit is contained in:
Mihajlo Medjedovic
2020-11-12 16:03:32 +01:00
parent c7b0821081
commit e9be1cf99a
2 changed files with 37 additions and 15 deletions

View File

@@ -607,7 +607,7 @@ export class SASViyaApiClient {
})
return Promise.reject(
new ErrorResponse('Job execution failed', {
new ErrorResponse('Job execution failed.', {
status: 500,
body: log
})
@@ -1114,7 +1114,7 @@ export class SASViyaApiClient {
}
if (!jobToExecute) {
throw new Error(`The job ${sasJob} was not found.`)
throw new Error(`Job was not found.`)
}
const jobDefinitionLink = jobToExecute?.links.find(
(l) => l.rel === 'getResource'