Expand array props in list storage API#909
Conversation
|
PR Review: Expand array props in list storage API Overall this is a clean, well-tested change. One minor concern. 🔵 Minor - Code Quality Unguarded JSON.parse on line 106 of list-storage.ts if (isArrayKey(key)) { If prop.value is not valid JSON (e.g. a stale/corrupted Redis entry), this throws a SyntaxError that surfaces as a 500. The data flow through GameChannelStorageProp.flatten() guarantees it will always be a JSON array string under normal conditions, so the risk is low. But a try/catch here would prevent a corrupted cache key from breaking the entire request: if (isArrayKey(key)) { No other issues found. The expansion logic is correct, the caching behaviour is preserved, and the new tests cover both the DB and Redis-cached paths. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #909 +/- ##
===========================================
+ Coverage 97.39% 97.41% +0.01%
===========================================
Files 405 405
Lines 6599 6604 +5
Branches 870 871 +1
===========================================
+ Hits 6427 6433 +6
Misses 88 88
+ Partials 84 83 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
No description provided.