fix(httputil): rename error body field platformCode → platform_code #2

Merged
Rene Nochebuena merged 1 commits from fix/platform-code-error-body into main 2026-05-21 19:34:42 -06:00

Summary

  • Corrects errorBody() JSON key from "platformCode" to "platform_code" to match
    the OpenAPI spec snake_case convention
  • Bumps xerrors dependency to v1.0.2 (which carries the same fix for MarshalJSON)
  • Updates all test assertions to expect "platform_code"
  • Adds PR.md to .gitignore

Test plan

  • go test ./... passes
  • HTTP error response body contains "platform_code", not "platformCode"
  • "platform_code" is absent when platform code is empty
## Summary - Corrects `errorBody()` JSON key from `"platformCode"` to `"platform_code"` to match the OpenAPI spec snake_case convention - Bumps `xerrors` dependency to v1.0.2 (which carries the same fix for `MarshalJSON`) - Updates all test assertions to expect `"platform_code"` - Adds `PR.md` to `.gitignore` ## Test plan - [x] `go test ./...` passes - [x] HTTP error response body contains `"platform_code"`, not `"platformCode"` - [x] `"platform_code"` is absent when platform code is empty
Rene Nochebuena added 1 commit 2026-05-21 19:34:29 -06:00
errorBody() map key corrected from "platformCode" to "platform_code" to
match the OpenAPI spec snake_case convention. All HTTP error responses
produced by Error(w, err) now emit "platform_code" in the JSON body.
PR.md added to .gitignore.
Depends on xerrors v1.0.2 (go.mod bumped in follow-up commit after xerrors tag).
Rene Nochebuena requested review from CoreDevelopers 2026-05-21 19:34:29 -06:00
Rene Nochebuena requested review from Agents 2026-05-21 19:34:29 -06:00
Rene Nochebuena merged commit b794bf668e into main 2026-05-21 19:34:42 -06:00
Rene Nochebuena deleted branch fix/platform-code-error-body 2026-05-21 19:34:42 -06:00
Sign in to join this conversation.