TP-66615 | Litmus API donotHandleError flag added (#842)

This commit is contained in:
Mantri Ramkishor
2024-06-27 12:49:17 +05:30
committed by GitHub
4 changed files with 8 additions and 7 deletions

View File

@@ -134,8 +134,8 @@ def reactNativeArchitectures() {
return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]
}
def VERSION_CODE = 171
def VERSION_NAME = "2.11.5"
def VERSION_CODE = 172
def VERSION_NAME = "2.11.6"
android {
ndkVersion rootProject.ext.ndkVersion

View File

@@ -1,7 +1,7 @@
{
"name": "AV_APP",
"version": "2.11.5",
"buildNumber": "171",
"version": "2.11.6",
"buildNumber": "172",
"private": true,
"scripts": {
"android:dev": "yarn move:dev && react-native run-android",

View File

@@ -73,7 +73,7 @@ export const addClickstreamEvent = async (
isOnline,
batteryLevel: batteryLevel ? String(batteryLevel * 100) : 'error',
height: SCREEN_HEIGHT,
width: SCREEN_WIDTH
width: SCREEN_WIDTH,
};
const eventAttributes = { ...attributes, ...defaultAttributes, createdAt: Date.now() };
const eventDetails = {
@@ -161,12 +161,12 @@ export const sendApiToClickstreamEvent = (
const url = response?.config?.url;
const statusCode = response?.status;
if (url) {
const apiKey = getKeyByValue(url, API_URLS);
const apiKey = getKeyByValue(url, API_URLS);
if (apiKey && DISABLE_API_EVENTS_URL.indexOf(apiKey) === -1) {
const eventName = getEventNameFromAPIKey(apiKey, isSuccess);
addClickstreamEvent(
{ name: eventName, description: eventName },
{ timeTaken: milliseconds, statusCode }
{ timeTaken: milliseconds, statusCode, response: statusCode === 400 ? response : '' }
);
}
}

View File

@@ -24,6 +24,7 @@ const getLitmusExperimentResult = async (
const response = await axiosInstance.get(litmusApi, {
headers: {
'X-Target': 'LITMUS',
donotHandleError: true,
...stickynessConfig,
},
});