Skip to content

Commit a41114b

Browse files
committed
refactor: SDKE-560 Refactor logs for email mismatches
1 parent 3fb8cb1 commit a41114b

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/roktManager.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,13 +207,13 @@ export default class RoktManager {
207207
if (emailChanged) {
208208
newIdentities.email = newEmail;
209209
if (newEmail) {
210-
this.logger.warning(`Email mismatch detected. Current email, ${currentEmail} differs from email passed to selectPlacements call, ${newEmail}. Proceeding to call identify with ${newEmail}. Please verify your implementation.`);
210+
this.logger.warning(`Email mismatch detected. Current email differs from email passed to selectPlacements call. Proceeding to call identify with email from selectPlacements call. Please verify your implementation.`);
211211
}
212212
}
213213

214214
if (hashedEmailChanged) {
215215
newIdentities[this.mappedEmailShaIdentityType] = newHashedEmail;
216-
this.logger.warning(`emailsha256 mismatch detected. Current mParticle ${this.mappedEmailShaIdentityType} identity, ${currentHashedEmail}, differs from 'emailsha256' passed to selectPlacements call, ${newHashedEmail}. Proceeding to call identify with ${this.mappedEmailShaIdentityType} set to ${newHashedEmail}. Please verify your implementation`);
216+
this.logger.warning(`emailsha256 mismatch detected. Current mParticle hashedEmail differs from hashedEmail passed to selectPlacements call. Proceeding to call identify with hashedEmail from selectPlacements call. Please verify your implementation.`);
217217
}
218218

219219
if (!isEmpty(newIdentities)) {

test/jest/roktManager.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1030,7 +1030,7 @@ describe('RoktManager', () => {
10301030
}
10311031
}, expect.any(Function));
10321032
expect(mockMPInstance.Logger.warning).toHaveBeenCalledWith(
1033-
'Email mismatch detected. Current email, [email protected] differs from email passed to selectPlacements call, [email protected]. Proceeding to call identify with [email protected]. Please verify your implementation.'
1033+
'Email mismatch detected. Current email differs from email passed to selectPlacements call. Proceeding to call identify with email from selectPlacements call. Please verify your implementation.'
10341034
);
10351035
});
10361036

@@ -1217,7 +1217,7 @@ describe('RoktManager', () => {
12171217
}
12181218
}, expect.any(Function));
12191219
expect(mockMPInstance.Logger.warning).toHaveBeenCalledWith(
1220-
"emailsha256 mismatch detected. Current mParticle other5 identity, old-other-value, differs from 'emailsha256' passed to selectPlacements call, new-emailsha256-value. Proceeding to call identify with other5 set to new-emailsha256-value. Please verify your implementation"
1220+
"emailsha256 mismatch detected. Current mParticle hashedEmail differs from hashedEmail passed to selectPlacements call. Proceeding to call identify with hashedEmail from selectPlacements call. Please verify your implementation."
12211221
);
12221222
});
12231223

@@ -1307,7 +1307,7 @@ describe('RoktManager', () => {
13071307
}
13081308
}, expect.any(Function));
13091309
expect(mockMPInstance.Logger.warning).toHaveBeenCalledWith(
1310-
"emailsha256 mismatch detected. Current mParticle other identity, undefined, differs from 'emailsha256' passed to selectPlacements call, new-emailsha256-value. Proceeding to call identify with other set to new-emailsha256-value. Please verify your implementation"
1310+
"emailsha256 mismatch detected. Current mParticle hashedEmail differs from hashedEmail passed to selectPlacements call. Proceeding to call identify with hashedEmail from selectPlacements call. Please verify your implementation."
13111311
);
13121312
});
13131313

0 commit comments

Comments
 (0)