From 553003192a1492220e3930c6b6f2dd11ebac1bcb Mon Sep 17 00:00:00 2001 From: mihir-4116 Date: Mon, 23 Oct 2023 17:23:28 +0530 Subject: [PATCH 1/4] fix(hubspot): property mismatch --- src/v0/destinations/hs/util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/v0/destinations/hs/util.js b/src/v0/destinations/hs/util.js index 5d7a01da74..31c4252a4b 100644 --- a/src/v0/destinations/hs/util.js +++ b/src/v0/destinations/hs/util.js @@ -605,7 +605,7 @@ const splitEventsForCreateUpdate = async (inputs, destination) => { const { destinationExternalId } = getDestinationExternalIDInfoForRetl(message, DESTINATION); const filteredInfo = updateHubspotIds.filter( - (update) => update.property.toString() === destinationExternalId.toString(), + (update) => update.property.toString().toLowerCase() === destinationExternalId.toString().toLowerCase(), ); if (filteredInfo.length > 0) { From 66b85d1b81a07872d8b07244704d3626b2d9832a Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Mon, 23 Oct 2023 12:08:37 +0000 Subject: [PATCH 2/4] chore(release): 1.46.5 --- CHANGELOG.md | 8 ++++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 08d7a89e63..dc896156c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,14 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [1.46.5](https://github.com/rudderlabs/rudder-transformer/compare/v1.46.4...v1.46.5) (2023-10-23) + + +### Bug Fixes + +* **hubspot:** property mismatch ([5530031](https://github.com/rudderlabs/rudder-transformer/commit/553003192a1492220e3930c6b6f2dd11ebac1bcb)) +* **hubspot:** property mismatch ([#2765](https://github.com/rudderlabs/rudder-transformer/issues/2765)) ([5ddabdf](https://github.com/rudderlabs/rudder-transformer/commit/5ddabdf04f22ccd740a9bbdea42b18f128b31f94)) + ### [1.46.4](https://github.com/rudderlabs/rudder-transformer/compare/v1.46.3...v1.46.4) (2023-10-20) diff --git a/package-lock.json b/package-lock.json index 991f958db0..6712f1003c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "rudder-transformer", - "version": "1.46.4", + "version": "1.46.5", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "rudder-transformer", - "version": "1.46.4", + "version": "1.46.5", "license": "ISC", "dependencies": { "@amplitude/ua-parser-js": "^0.7.24", diff --git a/package.json b/package.json index 503b1651ae..c796fb530a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rudder-transformer", - "version": "1.46.4", + "version": "1.46.5", "description": "", "homepage": "https://github.com/rudderlabs/rudder-transformer#readme", "bugs": { From 64f3c6c1b9953998e383e1700e1ed241953c4b78 Mon Sep 17 00:00:00 2001 From: mihir-4116 Date: Mon, 23 Oct 2023 17:41:07 +0530 Subject: [PATCH 3/4] chore: update change log --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dc896156c9..c52759ab48 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,6 @@ All notable changes to this project will be documented in this file. See [standa ### Bug Fixes * **hubspot:** property mismatch ([5530031](https://github.com/rudderlabs/rudder-transformer/commit/553003192a1492220e3930c6b6f2dd11ebac1bcb)) -* **hubspot:** property mismatch ([#2765](https://github.com/rudderlabs/rudder-transformer/issues/2765)) ([5ddabdf](https://github.com/rudderlabs/rudder-transformer/commit/5ddabdf04f22ccd740a9bbdea42b18f128b31f94)) ### [1.46.4](https://github.com/rudderlabs/rudder-transformer/compare/v1.46.3...v1.46.4) (2023-10-20) From 6b23a9b33acd28fdacaa2390c1970a1fa4415ffa Mon Sep 17 00:00:00 2001 From: Anant Jain <62471433+anantjain45823@users.noreply.github.com> Date: Tue, 24 Oct 2023 13:18:55 +0530 Subject: [PATCH 4/4] fix: salesforce: handle ECONNABORTED error (#2732) * fix: salesforce: handle ECONNABORTED error * chore: added status codes to universal error code handler * chore: added error codes to salesforce error code handler * fix: using correct error response * comment addressed+1 --- src/adapters/utils/networkUtils.js | 8 +++ .../data/salesforce/proxy_response.json | 10 +++ .../data/salesforce_proxy_input.json | 66 +++++++++++++++++++ .../data/salesforce_proxy_output.json | 52 ++++++++++++++- 4 files changed, 135 insertions(+), 1 deletion(-) diff --git a/src/adapters/utils/networkUtils.js b/src/adapters/utils/networkUtils.js index a88d803fac..7f830f5a4b 100644 --- a/src/adapters/utils/networkUtils.js +++ b/src/adapters/utils/networkUtils.js @@ -71,6 +71,14 @@ const nodeSysErrorToStatus = (code) => { status: 500, message: '[ETIMEDOUT] :: Operation timed out', }, + EAI_AGAIN: { + status: 500, + message: '[EAI_AGAIN] :: Temporary failure in name resolution', + }, + ECONNABORTED: { + status: 500, + message: '[ECONNABORTED] :: Connection aborted', + }, }; return sysErrorToStatusMap[code] || { status: 400, message: `[${code}]` }; }; diff --git a/test/__mocks__/data/salesforce/proxy_response.json b/test/__mocks__/data/salesforce/proxy_response.json index 2ce60e4ec9..a92edc58c2 100644 --- a/test/__mocks__/data/salesforce/proxy_response.json +++ b/test/__mocks__/data/salesforce/proxy_response.json @@ -1,4 +1,14 @@ { + "https://rudderstack.my.salesforce.com/services/data/v50.0/sobjects/Lead/101": { + "message": "Connection Aborted", + "name": "Error", + "code": "ECONNABORTED" + }, + "https://rudderstack.my.salesforce.com/services/data/v50.0/sobjects/Lead/102": { + "message": "DNS not found", + "name": "Error", + "code": "EAI_AGAIN" + }, "https://rudderstack.my.salesforce.com/services/data/v50.0/sobjects/Lead/1": { "response": { "data": { diff --git a/test/__tests__/data/salesforce_proxy_input.json b/test/__tests__/data/salesforce_proxy_input.json index f7b8257510..f1aeef71ab 100644 --- a/test/__tests__/data/salesforce_proxy_input.json +++ b/test/__tests__/data/salesforce_proxy_input.json @@ -1,4 +1,70 @@ [ + { + "type": "REST", + "files": {}, + "method": "POST", + "userId": "", + "headers": { + "Content-Type": "application/json", + "Authorization": "Bearer token" + }, + "version": "1", + "endpoint": "https://rudderstack.my.salesforce.com/services/data/v50.0/sobjects/Lead/101", + "body": { + "XML": {}, + "FORM": {}, + "JSON": { + "Email": "denis.kornilov@sbermarket.ru", + "Company": "sbermarket.ru", + "LastName": "Корнилов", + "FirstName": "Денис", + "LeadSource": "App Signup", + "account_type__c": "free_trial" + }, + "JSON_ARRAY": {} + }, + "metadata": { + "destInfo": { + "authKey": "2HezPl1w11opbFSxnLDEgZ7kWTf" + } + }, + "params": { + "destination": "salesforce" + } + }, + { + "type": "REST", + "files": {}, + "method": "POST", + "userId": "", + "headers": { + "Content-Type": "application/json", + "Authorization": "Bearer token" + }, + "version": "1", + "endpoint": "https://rudderstack.my.salesforce.com/services/data/v50.0/sobjects/Lead/102", + "body": { + "XML": {}, + "FORM": {}, + "JSON": { + "Email": "denis.kornilov@sbermarket.ru", + "Company": "sbermarket.ru", + "LastName": "Корнилов", + "FirstName": "Денис", + "LeadSource": "App Signup", + "account_type__c": "free_trial" + }, + "JSON_ARRAY": {} + }, + "metadata": { + "destInfo": { + "authKey": "2HezPl1w11opbFSxnLDEgZ7kWTf" + } + }, + "params": { + "destination": "salesforce" + } + }, { "type": "REST", "files": {}, diff --git a/test/__tests__/data/salesforce_proxy_output.json b/test/__tests__/data/salesforce_proxy_output.json index e5fc2f0bb3..c900661b75 100644 --- a/test/__tests__/data/salesforce_proxy_output.json +++ b/test/__tests__/data/salesforce_proxy_output.json @@ -1,4 +1,54 @@ [ + { + "output": { + "status": 500, + "message": "Salesforce Request Failed - due to \"\"[ECONNABORTED] :: Connection aborted\"\", (Retryable) during Salesforce Response Handling", + "destinationResponse": { + "response": "[ECONNABORTED] :: Connection aborted", + "status": 500, + "rudderJobMetadata": { + "destInfo": { + "authKey": "2HezPl1w11opbFSxnLDEgZ7kWTf" + } + } + }, + "statTags": { + "destType": "SALESFORCE", + "errorCategory": "network", + "destinationId": "Non-determininable", + "workspaceId": "Non-determininable", + "errorType": "retryable", + "feature": "dataDelivery", + "implementation": "native", + "module": "destination" + } + } + }, + { + "output": { + "status": 500, + "message": "Salesforce Request Failed - due to \"\"[EAI_AGAIN] :: Temporary failure in name resolution\"\", (Retryable) during Salesforce Response Handling", + "destinationResponse": { + "response": "[EAI_AGAIN] :: Temporary failure in name resolution", + "status": 500, + "rudderJobMetadata": { + "destInfo": { + "authKey": "2HezPl1w11opbFSxnLDEgZ7kWTf" + } + } + }, + "statTags": { + "destType": "SALESFORCE", + "errorCategory": "network", + "destinationId": "Non-determininable", + "workspaceId": "Non-determininable", + "errorType": "retryable", + "feature": "dataDelivery", + "implementation": "native", + "module": "destination" + } + } + }, { "output": { "status": 200, @@ -207,4 +257,4 @@ } } } -] +] \ No newline at end of file