feat(types): Add gRPC Richer Error Model support (BadRequest) (#1068)* types: add tonic as dependency, add error_details.proto * types: add BadRequest support from flemosr/tonic-richer-error
feat(types): Add gRPC Richer Error Model support (BadRequest) (#1068)* 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`.
show more ...
feat(types): Add `tonic-types` crate (#391)