-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PM-14646: Fix JSON decoding errors #1122
PM-14646: Fix JSON decoding errors #1122
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## release/2024.11-rc1 #1122 +/- ##
======================================================
Coverage ? 89.43%
======================================================
Files ? 682
Lines ? 43109
Branches ? 0
======================================================
Hits ? 38556
Misses ? 4553
Partials ? 0 ☔ View full report in Codecov by Sentry. |
No New Or Fixed Issues Found |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏻 I like it! Makes us more robust.
My only thought is if there might be other places we want to make something be @DefaultValue
, though I can't name any offhand. Worst case is we apply it as we find it, I suppose.
I had that thought too, but I didn't want to introduce too many changes here. I can take another pass through separately and see if there's other places we could apply this (enums are the most susceptible to failures around this). |
🎟️ Tracking
PM-14646 - Fix JSON decoding errors for invalid CipherRepromptType, SecureNoteType, decimal policy timeout minutes
PM-13105 - [iOS] Users getting "An Error has occurred" and can't access their vaults
📔 Objective
This fixes the following JSON decoding errors:
Invalid CipherRepromptType:
Invalid SecureNoteType:
Unexpected decimal when decoding a vault timeout policy minutes property:
Fixes:
@DefaultValue
property wrapper that will use a default value if the item is unable to be decoded, either because it's missing or invalid. Both of these enums have reasonable default values that we could use in the case of an invalid value.AnyCodable
to decodeDouble
values. This is then used to convert the value to anInt
if that's what we're expecting when we attempt to use the value.⏰ Reminders before review
🦮 Reviewer guidelines
:+1:
) or similar for great changes:memo:
) or ℹ️ (:information_source:
) for notes or general info:question:
) for questions:thinking:
) or 💭 (:thought_balloon:
) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion:art:
) for suggestions / improvements:x:
) or:warning:
) for more significant problems or concerns needing attention:seedling:
) or ♻️ (:recycle:
) for future improvements or indications of technical debt:pick:
) for minor or nitpick changes