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).
Bump xerrors to v1.0.1 and valid to v1.0.1. Go directive bumped to 1.26.
API committed as stable: Handle, HandleNoBody, HandleEmpty, HandlerFunc,
JSON, NoContent, and Error are unchanged from v0.10.0.
- Error(w, err) now extracts PlatformCode() from *xerrors.Err and
includes "platformCode" in the JSON body when set; omitted otherwise
- errorBody updated to accept platformCode as an explicit parameter
- Upgraded code.nochebuena.dev/go/xerrors dependency to v0.10.0
- Added two new tests: platformCode included when set, omitted when absent
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Reviewed-on: #1
Reviewed-by: Rene Nochebuena <rene@noreply.nochebuena.dev>
Co-authored-by: Claude Code <claude@nochebuena.dev>
Co-committed-by: Claude Code <claude@nochebuena.dev>