fix(llc): Fix UpsertPushPreferencesResponse null values parsing#2749
fix(llc): Fix UpsertPushPreferencesResponse null values parsing#2749VelikovPetar wants to merge 8 commits into
UpsertPushPreferencesResponse null values parsing#2749Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## v9 #2749 +/- ##
=====================================
Coverage ? 65.96%
=====================================
Files ? 425
Lines ? 26931
Branches ? 0
=====================================
Hits ? 17765
Misses ? 9166
Partials ? 0 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Submit a pull request
CLA
Description of the pull request
We currently fail to parse
nullvalues in theUpsertPushPreferencesResponse.userPreferencesmap (when response is in the following format):{ user_preferences: {salvatore: null}, user_channel_preferences: {salvatore: {messaging:!members-QOJWJvjGC-iBN9hHDdGMThtJxoUzR1kizb4pv-n0BtE: {chat_level: all}}}, duration: "11.67ms" }Which is the response we get when we update channel-specific push preferences. In this case, the customer gets the error:
Failed to set push preferences: type 'Null' is not a subtype of type 'Map<String, dynamic>' in type cast, even though the operation was successful.The fix makes the parser more robust, allowing the
user_preferencesJSON to havenullvalues.