braze-inc / braze-flutter-sdk

Public repo for the Braze Flutter SDK
Other
15 stars 29 forks source link

Missing Error Data for Content Card Streams #58

Closed InderPanesar closed 6 months ago

InderPanesar commented 7 months ago

Presently, when we send a request to refreshContentCards, the stream does not return any errors in case the request encounters a failure.

In contrast, on iOS, the refreshContentCards method does provide the capability to capture failures when refreshing content card data from the stream. Unfortunately, in the Braze Flutter SDK, there is currently no built-in mechanism for handling these errors. The only available option is to delve into platform-specific code and modify the existing Method Channel.

Implementing this change would be valuable as it would enable users to observe an error state in the event of a failure in the Braze call, enhancing the overall user experience.

hokstuff commented 7 months ago

Hi @InderPanesar ,

This requested feature isn't available on the Flutter layer since the return values from the native layers have complexities from the different failure cases (e.g. return true but with an error). This is because a failure can occur in many places in the native SDKs and the underlying API is designed to be a void with errors handled via subscription. For the purpose of the Flutter SDK, we felt the current implementation for requestContentCardsRefresh would limit confusion.

Let me know if that helps clarify things!

hokstuff commented 6 months ago

If you have any further feedback or feature requests, feel free to reach out to your CSM or Support representative to show signal for the request. I will close out this issue since we don't have action items for this at the moment.

Thank you for raising it!