Commit Graph
4 Commits
Author SHA1 Message Date
Rene Nochebuena 9ce3ac8174 fix(xerrors): rename MarshalJSON field platformCode → platform_code (#3)
JSON tag on the anonymous struct inside MarshalJSON corrected from
`json:"platformCode,omitempty"` to `json:"platform_code,omitempty"` to
match the OpenAPI spec snake_case convention. All error responses that
serialize *Err directly now emit "platform_code" instead of "platformCode".
PR.md added to .gitignore.

Reviewed-on: #3
Co-authored-by: Rene Nochebuena Guerrero <rene@nochebuena.dev>
Co-committed-by: Rene Nochebuena Guerrero <rene@nochebuena.dev>
2026-05-21 19:30:11 -06:00
Rene Nochebuena 55c038f1b8 chore: bump go directive from 1.25 to 1.26 2026-05-12 02:06:45 +00:00
Rene Nochebuena c6ff8d0a3f feat(xerrors)!: promote to v1.0.0 — add Unauthorized and PermissionDenied constructors
Add Unauthorized and PermissionDenied convenience constructors to complete the
set of the five most-used error codes (InvalidInput, NotFound, Internal,
Unauthorized, PermissionDenied). All roadmap items from v0.9.0 resolved.
API committed as stable.
2026-05-11 17:49:52 -06:00
Rene Nochebuena 3cc36801a1 feat(xerrors): initial stable release v0.9.0
Structured application errors with typed codes, cause chaining, key-value context fields, and zero-import logz enrichment bridge.

What's included:
- `*Err` type implementing error, errors.Unwrap, json.Marshaler, ErrorCode(), and ErrorContext()
- Twelve typed Code constants aligned with gRPC canonical status names
- New / Wrap factory constructors plus InvalidInput / NotFound / Internal convenience constructors
- Builder methods WithContext and WithError for attaching structured fields and causes
- Duck-typed ErrorCode() / ErrorContext() bridge so logz auto-enriches log records without an import

Tested-via: todo-api POC integration
Reviewed-against: docs/adr/
2026-03-18 13:09:31 -06:00