mirror of
https://ghfast.top/https://github.com/aeroxw/easy_tdx_max.git
synced 2026-09-12 19:14:19 +08:00
Root cause: _market_from_str/_market/_category in routers used bare MarketEnum[key]/Market[key] without .upper() or try/except, so lowercase or invalid values (sz, ZZZ) threw uncaught KeyError → 500. Fix: extract shared convert.py with market_from_str/category_from_str that do .upper() + ValueError on invalid input. All 4 routers updated. 4 regression tests added for case-insensitive and invalid input.