mirror of
https://github.com/sasjs/adapter.git
synced 2025-12-11 09:24:35 +00:00
Merge branch 'master' into allanbowe-patch-1
This commit is contained in:
@@ -1110,7 +1110,10 @@ export class SASViyaApiClient {
|
||||
'text/plain'
|
||||
)
|
||||
.catch((err) => {
|
||||
throw prefixMessage(err, 'Error while getting job state. ')
|
||||
throw prefixMessage(
|
||||
err,
|
||||
'Error while getting job state after interval. '
|
||||
)
|
||||
})
|
||||
|
||||
postedJobState = jobState.trim()
|
||||
|
||||
@@ -93,6 +93,7 @@ export class RequestClient implements HttpClient {
|
||||
.get<T>(url, requestConfig)
|
||||
.then((response) => {
|
||||
throwIfError(response)
|
||||
|
||||
return this.parseResponse<T>(response)
|
||||
})
|
||||
.catch(async (e) => {
|
||||
@@ -387,6 +388,8 @@ export class RequestClient implements HttpClient {
|
||||
throw new NotFoundError(response.config.url!)
|
||||
}
|
||||
|
||||
console.log(`[e]`, e)
|
||||
|
||||
throw e
|
||||
}
|
||||
|
||||
@@ -456,6 +459,7 @@ const throwIfError = (response: AxiosResponse) => {
|
||||
}
|
||||
|
||||
const error = parseError(response.data as string)
|
||||
|
||||
if (error) {
|
||||
throw error
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user