claude-memory/graph/solutions/game-metadata-validation-prevents-null-team-data-caf1f9.md
Cal Corum b140d4d82a migrate: 313 memories from MemoryGraph
- 313 new markdown files created
- 30 relationships embedded
- 313 entries indexed
- State initialized with usage data
2026-02-13 11:11:48 -06:00

13 lines
667 B
Markdown

---
id: caf1f9fa-61cd-4b51-8d8a-840198cc5181
type: solution
title: "Game metadata validation prevents null team data"
tags: [strat-gameplay-webapp, python, fastapi, fix, validation]
importance: 0.6
confidence: 0.8
created: "2026-01-25T00:19:29.151542+00:00"
updated: "2026-01-25T00:19:29.151542+00:00"
---
Fixed bug where games were created with null team metadata (names, colors, thumbnails). Root cause: sba_api_client.get_teams_by_ids() silently returned empty dict on API failures, and create_game()/quick_create_game() didn't validate. Solution: Added validation to raise HTTP 400 if teams not found, plus warning logs in get_teams_by_ids() when teams missing.