diff --git a/src/v0/destinations/google_adwords_enhanced_conversions/networkHandler.js b/src/v0/destinations/google_adwords_enhanced_conversions/networkHandler.js index 1f59eb9e40..e25349dfdc 100644 --- a/src/v0/destinations/google_adwords_enhanced_conversions/networkHandler.js +++ b/src/v0/destinations/google_adwords_enhanced_conversions/networkHandler.js @@ -1,10 +1,7 @@ const { get, set } = require('lodash'); const sha256 = require('sha256'); const { prepareProxyRequest, handleHttpRequest } = require('../../../adapters/network'); -const { - isHttpStatusSuccess, - getAuthErrCategoryFromErrDetailsAndStCode, -} = require('../../util/index'); +const { isHttpStatusSuccess, getAuthErrCategoryFromStCode } = require('../../util/index'); const { CONVERSION_ACTION_ID_CACHE_TTL } = require('./config'); const Cache = require('../../util/cache'); @@ -60,10 +57,7 @@ const getConversionActionId = async (method, headers, params) => { [tags.TAG_NAMES.ERROR_TYPE]: getDynamicErrorType(gaecConversionActionIdResponse.status), }, gaecConversionActionIdResponse.response, - getAuthErrCategoryFromErrDetailsAndStCode( - get(gaecConversionActionIdResponse, 'status'), - get(gaecConversionActionIdResponse, ERROR_MSG_PATH), - ), + getAuthErrCategoryFromStCode(gaecConversionActionIdResponse.status), ); } const conversionActionId = get( @@ -142,7 +136,7 @@ const responseHandler = (destinationResponse) => { [tags.TAG_NAMES.ERROR_TYPE]: getDynamicErrorType(status), }, response, - getAuthErrCategoryFromErrDetailsAndStCode(status, response), + getAuthErrCategoryFromStCode(status), ); }; diff --git a/src/v0/destinations/google_adwords_remarketing_lists/networkHandler.js b/src/v0/destinations/google_adwords_remarketing_lists/networkHandler.js index 563e8b80a6..b8470f9d28 100644 --- a/src/v0/destinations/google_adwords_remarketing_lists/networkHandler.js +++ b/src/v0/destinations/google_adwords_remarketing_lists/networkHandler.js @@ -1,8 +1,5 @@ const { httpSend, prepareProxyRequest } = require('../../../adapters/network'); -const { - isHttpStatusSuccess, - getAuthErrCategoryFromErrDetailsAndStCode, -} = require('../../util/index'); +const { isHttpStatusSuccess, getAuthErrCategoryFromStCode } = require('../../util/index'); const { processAxiosResponse, @@ -144,7 +141,7 @@ const gaAudienceRespHandler = (destResponse, stageMsg) => { [tags.TAG_NAMES.ERROR_TYPE]: getDynamicErrorType(status), }, response, - getAuthErrCategoryFromErrDetailsAndStCode(status, response), + getAuthErrCategoryFromStCode(status), ); };