Skip to content

Commit

Permalink
Merge branch 'production-staging' into feat.AC-site-tracking
Browse files Browse the repository at this point in the history
  • Loading branch information
MoumitaM authored Sep 1, 2023
2 parents b22a048 + 4d5ffaa commit f7dff26
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/integrations/Sendinblue/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,20 @@ class Sendinblue {
const { message } = rudderElement;
const { email, phone } = getDefinedTraits(message);

if (!email || !validateEmail(email)) {
if (!email) {
logger.error('[Sendinblue]:: email is missing');
return;
}

if (!validateEmail(email)) {
logger.error('[Sendinblue]:: provided email is invalid');
return;
}

if (phone && !validatePhoneWithCountryCode(phone)) {
logger.error('[Sendinblue]:: provided phone number is invalid');
logger.error(
'[Sendinblue]:: provided phone number is invalid. Please provide valid phone number with country code',
);
return;
}

Expand All @@ -78,7 +85,9 @@ class Sendinblue {
if (this.sendTraitsInTrack) {
const { phone } = getDefinedTraits(message);
if (phone && !validatePhoneWithCountryCode(phone)) {
logger.error('[Sendinblue]:: provided phone number is invalid');
logger.error(
'[Sendinblue]:: provided phone number is invalid. Please provide valid phone number with country code',
);
return;
}
userTraits = this.sendTraitsInTrack
Expand Down

0 comments on commit f7dff26

Please sign in to comment.