* types: add support for `LocalizedMessage` error message type
Following implementation at flemosr/tonic-richer-error.
* types: add `ErrorDetails::with_help_link`
* types: add support for `Help` error message type
Following implementation at flemosr/tonic-richer-error.
* types: add `ResourceInfo` to `gen_status_with_details` test
* types: use `impl Into<Vec<T>>` instead of `Vec<T>` in pub fn's params
* types: comply with clippy
* types: fix names of some tests and vars in `std_messages`
* types: add support for `ResourceInfo` error message type
Following implementation at flemosr/tonic-richer-error.
* types: update doc comment examples
---------
Co-authored-by: Lucio Franco <luciofranco14@gmail.com>
* types: add support for `PreconditionFailure` error message type
Following implementation at flemosr/tonic-richer-error.
* types: doc comments nits
* types: merge `impl` blocks at `std_messages`
Add the code related to richer error model support to a new
`richer_error` module. This improves readability and hopefully will
make it easier to add new features to `tonic-types` in the future.
* types: add tonic as dependency, add error_details.proto
* types: add BadRequest support from flemosr/tonic-richer-error
* types: adjust code following suggestions
Adjustments following suggestions by @LucioFranco in https://github.com/hyperium/tonic/pull/1068.
Adjust style, remove unecessary prints, avoid glob imports, apply
`non_exhaustive` to `ErrorDetails` and `ErrorDetail`, avoid pub
fields in `ErrorDetails`, adjust
`WithErrorDetails::with_error_details_vec` args, add
`gen_details_bytes`.
* types: add generated protobuf code
As suggested by @LucioFranco in https://github.com/hyperium/tonic/pull/1068#discussion_r956117520.
This avoids the need for consumers to have `protoc` in their path.
Implemented following changes in https://github.com/hyperium/tonic/pull/1065.
* types: add custom metadata support
This allows consumers to provide custom metadata when creating a
`Status` with error details.
* types: adjust code following suggestions
Adjustments following suggestions by @LucioFranco in https://github.com/hyperium/tonic/pull/1068.
Move `error_details_vec` mod into `error_details` mod, adjust doc
comments, rename `WithErrorDetails` trait to `StatusExt`.
* bump tonic version to 0.5
* Update changelog for 0.5
* Update CHANGELOG.md
Co-authored-by: David Pedersen <david.pdrsn@gmail.com>
* address comments
Co-authored-by: David Pedersen <david.pdrsn@gmail.com>
* Upgrade Tonic to Tokio 1.0
Work in progress for updating Tonic to Tokio 1.0. Since tower has not
been released to crates.io, a git dependency is taken instead.
* Upgrade Tonic to Tokio 1.0 phase 2
* tonic: remove tower-* deps
* Apply suggestions from code review
Co-authored-by: Ed Marshall <marshaled@protonmail.com>
Co-authored-by: Lucio Franco <luciofranco14@gmail.com>