v0.4.0
Released 21 August 2026.
Pre-alpha. Minor releases may contain breaking changes before v1.0.
Install
go install github.com/caspel26/goninja/cmd/goninja@v0.4.0
go get github.com/caspel26/goninja@v0.4.0Requires Go 1.25 or newer.
Added
Configure errors once for the whole API
API.SetErrorMapper registers typed error mappings on the application and
applies them to resources that do not set their own mapper. Use
goninja.NewErrorMapping to define a mapping and goninja.NewErrorMapper to
compose mappings into a mapper.
Config.DefaultErrorMapper remains available for an explicit mapper supplied
to MountWithConfig. A resource-level mapper has the highest priority,
followed by the config/API default, then goninja’s built-in default mapper.
This lets applications share consistent error responses without repeating configuration on every generated resource.