-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: email validation for braze #2929
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1037,6 +1037,77 @@ | |
}, | ||
{ | ||
"statusCode": 400, | ||
"message": "Invalid email, email must be a valid string" | ||
"message": "Invalid email, email must be a valid string or null" | ||
}, | ||
{ | ||
"body": { | ||
"FORM": {}, | ||
"JSON": { | ||
"attributes": [ | ||
{ | ||
"_update_existing_only": false, | ||
"city": "Disney", | ||
"country": "USA", | ||
"email": null, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Email is still coming as null There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we want to allow email as this is reserved keys and should pass as it is. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. earlier code |
||
"firstname": "Mickey", | ||
"user_alias": { | ||
"alias_label": "rudder_id", | ||
"alias_name": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca" | ||
} | ||
} | ||
], | ||
"partner": "RudderStack", | ||
"purchases": [ | ||
{ | ||
"_update_existing_only": false, | ||
"currency": "USD", | ||
"price": 0, | ||
"product_id": "507f1f77bcf86cd799439023", | ||
"properties": { | ||
"category": "Games", | ||
"image_url": "https:///www.example.com/product/path.jpg", | ||
"name": "Monopoly: 3rd Edition", | ||
"url": "https://www.example.com/product/path" | ||
}, | ||
"quantity": 1, | ||
"time": "2020-01-24T11:59:02.402+05:30", | ||
"user_alias": { | ||
"alias_label": "rudder_id", | ||
"alias_name": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca" | ||
} | ||
}, | ||
{ | ||
"_update_existing_only": false, | ||
"currency": "USD", | ||
"price": 0, | ||
"product_id": "505bd76785ebb509fc183724", | ||
"properties": { | ||
"category": "Games", | ||
"name": "Uno Card Game" | ||
}, | ||
"quantity": 2, | ||
"time": "2020-01-24T11:59:02.402+05:30", | ||
"user_alias": { | ||
"alias_label": "rudder_id", | ||
"alias_name": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca" | ||
} | ||
} | ||
] | ||
}, | ||
"JSON_ARRAY": {}, | ||
"XML": {} | ||
}, | ||
"endpoint": "https://rest.fra-01.braze.eu/users/track", | ||
"files": {}, | ||
"headers": { | ||
"Accept": "application/json", | ||
"Authorization": "Bearer dummyApiKey", | ||
"Content-Type": "application/json" | ||
}, | ||
"method": "POST", | ||
"params": {}, | ||
"type": "REST", | ||
"userId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", | ||
"version": "1" | ||
} | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if v is null ..then our first check v!== 'string' will be true and gives NPE...we will never go to else if condition
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
corrected now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated