Closed julianvogels closed 5 years ago
I would like to handle any errors when calling track or identify functions. However, the functions don't return anything. The function _requestKlaviyo creates and returns a Promise to the track and identify functions, but this Promise is not returned by the latter two: https://github.com/itso-io/klaviyo-node/blob/a79a670ef8585ca493ecc6b9f2686bf6c01e5cf8/lib/index.js#L184
track
identify
_requestKlaviyo
Promise
Is this intentional? Are there reasons for not passing along the Promise for error handling and logic further down in my application?
@julianvogels Great point! There's no good reason and @emmanuelbuah already created a PR. Will merge now.
I would like to handle any errors when calling
track
oridentify
functions. However, the functions don't return anything. The function_requestKlaviyo
creates and returns aPromise
to thetrack
andidentify
functions, but thisPromise
is not returned by the latter two: https://github.com/itso-io/klaviyo-node/blob/a79a670ef8585ca493ecc6b9f2686bf6c01e5cf8/lib/index.js#L184Is this intentional? Are there reasons for not passing along the Promise for error handling and logic further down in my application?