Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/thalesfsp/customerror
- Owner: thalesfsp
- License: mit
- Created: 2022-09-13T21:58:38.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-06-23T00:30:00.000Z (over 1 year ago)
- Last Synced: 2023-07-27T22:42:58.060Z (over 1 year ago)
- Topics: custom-error, go, golang
- Language: Go
- Homepage: https://github.com/thalesfsp/customerror
- Size: 57.6 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
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).