Skip to content
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

Merged
merged 2 commits into from
Jan 20, 2022
Merged

Errors and logs #47

merged 2 commits into from
Jan 20, 2022

Conversation

flub
Copy link
Contributor

@flub flub commented Jan 20, 2022

This wires up Error::source and adds a little more debug logging. Both are very helpful to understand what is going on.

Copy link
Owner

@djc djc left a 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/error.rs Show resolved Hide resolved
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");
Copy link
Owner

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?

Copy link
Contributor Author

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 :)

@djc
Copy link
Owner

djc commented Jan 20, 2022

Sorry, would you mind squashing the last commit into the first one? I'd like to rebase a nice commit history.

Floris Bruynooghe added 2 commits January 20, 2022 15:22
This makes the std::error::Error::source() report the original error,
allowing "reporting types" like anyhow::Error to display the entire
error chain nicely.
@flub
Copy link
Contributor Author

flub commented Jan 20, 2022

Sorry, would you mind squashing the last commit into the first one? I'd like to rebase a nice commit history.

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.

@djc djc merged commit 5be8d8e into djc:master Jan 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants