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

fix: refactor the default callback for axios interceptors

This commit is contained in:
2025-02-28 18:21:44 +05:00
parent 851b8fce2a
commit be3ce56b85
3 changed files with 89 additions and 106 deletions

View File

@@ -1170,8 +1170,8 @@ export default class SASjs {
* @param errorCallBack - function that should be triggered on every HTTP response with the status different from 2**.
*/
public enableVerboseMode(
successCallBack?: (response: AxiosResponse | AxiosError) => AxiosResponse,
errorCallBack?: (response: AxiosResponse | AxiosError) => AxiosResponse
successCallBack?: (response: AxiosResponse) => AxiosResponse,
errorCallBack?: (response: AxiosError) => AxiosError
) {
this.requestClient?.enableVerboseMode(successCallBack, errorCallBack)
}