Contributing

Getting started

git clone https://github.com/bakhod1r/errorx
cd errorx
make all

Before opening a pull request

  • make fmt vet test passes.
  • New behavior comes with tests; adapter changes come with a test that feeds the real driver error type through HandleError.
  • go mod tidy leaves go.mod and go.sum unchanged.

Where code goes

  • Root package: AppError, the registry, layer mapping, hooks, retries. It must stay free of driver dependencies.
  • adapter/<driver>: one package per third-party driver, exposing HandleError. A new adapter also registers its EXT_* codes in codes_external.go and codes_domain.go, because the registry lives in the root package.
  • reporter/<transport>: alert delivery.

Error codes

Business codes are not accepted into this repository — applications register their own with errorx.RegisterDomainCode. Codes that describe infrastructure (repository, service, handler, external drivers) do belong here.