braze-inc / braze-web-sdk

Public repo for the Braze Web SDK

Home Page:https://www.braze.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Feature]: requestImmediateDataFlush not reporting reason of failure

psimk opened this issue · comments

commented

What problem are you facing?

I am trying to debug why some of our users are reporting that the callback passed to requestImmediateDataFlush(callback) is being called with false. The SDK documentation does not seem to describe in what cases could the requestImmediateDataFlush call fail.

Workarounds

N/A

Ideal Solution

return an error describing the reason for the failure

Other Information

No response

Hi @psimk. The most common reason for this to happen would be an error/timeout when sending data to the Braze backend, most likely due to the user's internet connection. In this instance, the SDK would not be able to determine the exact cause of the error. However, I've filed a ticket internally to log more information when this occurs.

For other errors, the Braze SDK logs the error message provided by XMLHttpRequest, prefixed with Braze SDK Error: Network request error:. Are you able to see if any logs such as this occurred and if they match with the instances where the callback is called with false?