Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/thalesfsp/customerror

Custom errors standardizes errors across applications
https://github.com/thalesfsp/customerror

custom-error go golang

Last synced: 8 days ago
JSON representation

Custom errors standardizes errors across applications

Awesome Lists containing this project

README

        

# customerror

`customerror` provides the base block to create custom errors. It also provides built-in custom errors covering some common cases. A Custom Error provides context - a `Message` to an optionally wrapped `Err`. Additionally a `Code` - for example "E1010", and `StatusCode` can be provided. Both static (pre-created), and dynamic (in-line) errors can be easily created. `Code` helps a company build a catalog of errors, which helps, and improves customer service.

## Install

`$ go get github.com/thalesfsp/[email protected]`

## Usage

See [`example_test.go`](example_test.go), and [`customerror_test.go`](customerror_test.go) file.

## Documentation

Run `$ make doc` or check out [online](https://pkg.go.dev/github.com/thalesfsp/customerror).

## Development

Check out [CONTRIBUTION](CONTRIBUTION.md).

### Release

1. Update [CHANGELOG](CHANGELOG.md) accordingly.
2. Once changes from MR are merged.
3. Tag and release.

## Roadmap

Check out [CHANGELOG](CHANGELOG.md).