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