klaviyo / klaviyo-swift-sdk

SDK that allows users to incorporate Klaviyo's event and person tracking functionality within iOS applications. Written in Swift.
MIT License
10 stars 10 forks source link

Trimming white spaces in identifiers #171

Closed ajaysubra closed 2 months ago

ajaysubra commented 2 months ago

Description

When testing noticed that if you added white space we would still be making a call to our APIs with that white space and then fail with a 400. Trimming white space now before comparing the identifiers to see if they are empty or same as what the SDK holds in state. If it's same we avoid the API call and the subsequent failure. Note that there is an exception to this, when setting a profile we will still make the network call but it won't fail since the identifier will not be included. This is because there is no dedup check for set profile calls.

Check List

Manual Test Plan

1.

Supporting Materials