Files
Hermes-ui/packages
ekko 037c2881d8 fix(session-sync): add type guard for estimated_cost_usd to prevent NOT NULL errors (#314)
Fixes remaining NOT NULL constraint failures after PR #312.

Problem:
- Even with COALESCE in SQL, some sessions still fail with NOT NULL error
- Hermes may return undefined/null/NaN values that pass through COALESCE

Solution:
- Add explicit type guard: `typeof value === 'number'`
- Only use the value if it's a valid number, otherwise default to 0
- This ensures we never pass undefined/null/NaN to the database

Related to issue #308
2026-04-29 21:25:58 +08:00
..