-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add require! macro to include field information in MissingFields error #686
Conversation
No New Or Fixed Issues Found |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #686 +/- ##
==========================================
+ Coverage 60.41% 60.49% +0.08%
==========================================
Files 171 171
Lines 10426 10384 -42
==========================================
- Hits 6299 6282 -17
+ Misses 4127 4102 -25 ☔ View full report in Codecov by Sentry. |
# Conflicts: # crates/bitwarden/src/vault/cipher/login.rs
@@ -133,4 +133,14 @@ macro_rules! impl_bitwarden_error { | |||
impl_bitwarden_error!(ApiError); | |||
impl_bitwarden_error!(IdentityError); | |||
|
|||
macro_rules! require { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add some documentation here.
Type of change
Objective
Previously the MissingFields error didn't contain any usable information, plus it was unwieldy to use. With the use of a simple macro we can improve the error messaging and also simplify the error handling code.