mirror of
https://github.com/sasjs/adapter.git
synced 2025-12-27 16:00:04 +00:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6a3ab7032f | ||
|
|
d818d14cb4 | ||
|
|
599c130395 | ||
|
|
9ef2759e27 | ||
|
|
43355c88d4 | ||
|
|
15e1acaf4f |
@@ -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) => {
|
||||
@@ -106,7 +107,6 @@ export class RequestClient implements HttpClient {
|
||||
}
|
||||
)
|
||||
).catch((err) => {
|
||||
console.log(`[err]`, err)
|
||||
throw prefixMessage(err, 'Error while handling error. ')
|
||||
})
|
||||
})
|
||||
@@ -388,6 +388,8 @@ export class RequestClient implements HttpClient {
|
||||
throw new NotFoundError(response.config.url!)
|
||||
}
|
||||
|
||||
console.log(`[e]`, e)
|
||||
|
||||
throw e
|
||||
}
|
||||
|
||||
@@ -457,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