- 313 new markdown files created - 30 relationships embedded - 313 entries indexed - State initialized with usage data
2.1 KiB
2.1 KiB
| id | type | title | tags | importance | confidence | created | updated | relations | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0d5b864a-7787-4ee5-841d-b8b1556d6425 | error | Critical: Wrong API parameter name - used 'dem_week' instead of 'demotion_week' |
|
0.9 | 0.8 | 2026-02-02T03:29:04.489436+00:00 | 2026-02-02T03:29:04.489436+00:00 |
|
Error: Player team updates sent wrong parameter name to API, causing dem_week values to be ignored.
Problem: Code was sending 'dem_week' as query parameter, but API expects 'demotion_week'.
Root Cause: Developer misunderstood API parameter naming during initial implementation. Tests verified internal logic but not the actual API parameter name being sent.
Impact:
- v2.29.0 and v2.29.1 sent dem_week parameter which API silently ignored
- All player updates (transaction freeze, IL moves, draft picks) failed to set demotion_week field
- No errors raised - parameter was simply not recognized by API
Fix: Changed parameter name in services/player_service.py line 426:
- WRONG: updates['dem_week'] = dem_week
- CORRECT: updates['demotion_week'] = dem_week
Internal Naming: Kept Python parameter name as 'dem_week' for code brevity, but map to 'demotion_week' when sending to API.
Test Updates: Updated 4 tests to verify correct parameter name is sent to API.
Prevention Strategies:
- Always verify API parameter names against API documentation/OpenAPI spec
- Test against actual API or accurate mocks with exact parameter names
- Use API client type hints that match exact API contract
- Add integration tests that verify HTTP request parameters
- Check API response for success indicators, not just lack of errors
Quick Fix Pattern:
- Change parameter name in dictionary: 'dem_week' → 'demotion_week'
- Update all test assertions to check for correct parameter name
- Run tests to verify: pytest tests/test_services_player_service.py
- Deploy hotfix immediately
Deployment Impact: Required hotfix v2.29.2 to correct v2.29.0/v2.29.1.