summaryrefslogtreecommitdiff
path: root/player-server/internal/api/handlers_writejson_test.go
AgeCommit message (Collapse)Author
2026-05-20Buffer JSON before writing response in writeJSON (y9)Paul Buetow
Previously writeJSON wrote the status header before encoding, so an encode failure produced a misleading 200 (or other caller status) with a truncated body. Marshal into a bytes.Buffer first; on error emit 500 with a JSON error envelope instead.