AxiosFactory minor improvements
MODIFY
src/client/oicp/OICPClient.ts
src/client/oicp/OICPClient.ts
@@ -41,7 +41,7 @@ export default abstract class OICPClient {
this.oicpEndpoint = oicpEndpoint;
this.role = role.toLowerCase();
this.oicpConfig = Configuration.getOICPServiceConfig();
- this.axiosInstance = AxiosFactory.getAxiosInstance(tenant.id, { axiosConfig: this.getAxiosConfig(ServerAction.OICP_CREATE_AXIOS_INSTANCE) }, true);
+ this.axiosInstance = AxiosFactory.getAxiosInstance(tenant.id, { axiosConfig: this.getAxiosConfig(ServerAction.OICP_CREATE_AXIOS_INSTANCE) }, true); // FIXME: set noInterceptors = true to avoid 'Converting circular structure to JSON' Error
}
getLocalCountryCode(action: ServerAction): string {

MODIFY
src/utils/AxiosFactory.ts
src/utils/AxiosFactory.ts
@@ -14,7 +14,7 @@ export default class AxiosFactory {
private constructor() { }
// All could have been done at 'axios' level normally!
- public static getAxiosInstance(tenantID: string, instanceConfiguration?: { axiosConfig?: AxiosRequestConfig, axiosRetryConfig?: IAxiosRetryConfig }, noInterceptors?: boolean): AxiosInstance {
+ public static getAxiosInstance(tenantID: string, instanceConfiguration?: { axiosConfig?: AxiosRequestConfig, axiosRetryConfig?: IAxiosRetryConfig }, noInterceptors = false): AxiosInstance {
if (!instanceConfiguration) {
instanceConfiguration = {};
}

AxiosFactory minor improvements