-
-
Notifications
You must be signed in to change notification settings - Fork 38
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
Errors and logs #47
Errors and logs #47
Conversation
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.
Thanks for working on this!
src/lib.rs
Outdated
@@ -145,5 +152,6 @@ async fn get_authentication_manager( | |||
/// | |||
/// Returns `AuthenticationManager` which can be used to obtain tokens | |||
pub async fn init() -> Result<AuthenticationManager, Error> { | |||
log::debug!("initialising gcp_auth"); |
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.
Nit: make this Initializing...
to (a) make capitalization consistent with the other log messages you've added and (b) use US spelling?
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.
heh, I tend to prefer UK spelling but sure :)
Sorry, would you mind squashing the last commit into the first one? I'd like to rebase a nice commit history. |
This makes the std::error::Error::source() report the original error, allowing "reporting types" like anyhow::Error to display the entire error chain nicely.
No worries, done. I like keeping squashing till the very last usually, I also wish github would support at least fixup commits and autosquash or maybe even interactive rebase and merge. Oh well. |
This wires up Error::source and adds a little more debug logging. Both are very helpful to understand what is going on.