Change Result<T, impl miette::Diagnostic> to Result<T, E>
iamsauravsharma opened this issue · comments
Saurav Sharma commented
Category
User level API features/changes
Describe the feature you'd like to request
Currently some api returns Result<T, impl miette::Diagnostic>
instead of Result<T, E>
convert all methods for better consistency as well as it is easier to work with Result<T, E>
Currently 4 methods returns Result<T, impl miette::Diagnostic>
- https://docs.rs/cedar-policy/latest/cedar_policy/struct.Entity.html#method.attr
- https://docs.rs/cedar-policy/latest/cedar_policy/struct.EntityUid.html#method.from_json
- https://docs.rs/cedar-policy/latest/cedar_policy/struct.Template.html#method.to_json
- https://docs.rs/cedar-policy/latest/cedar_policy/struct.Policy.html#method.to_json
Describe alternatives you've considered
None
Additional context
No response
Is this something that you'd be interested in working on?
- 👋 I may be able to implement this feature request
-
⚠️ This feature might incur a breaking change
John Kastner commented
Somewhat related to #695. I think the comment there is relevant.
Basically, we're looking to rework error types in a 4.0 release, but we can consider non-breaking changes before that.
Craig Disselkoen commented
Related: #745