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

Improve error message when clientViaApplicationDefaultCredentials fails to log in #574

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rrousselGit
Copy link

Fixes #572

@rrousselGit
Copy link
Author

I'll admit, I'm not sure how to test that. Any suggestion?

@rrousselGit
Copy link
Author

@kevmoo Gentle bump :)
Nothing urgent don't worry

return await clientViaMetadataServer(baseClient: baseClient);
} on Exception catch (err, stack) {
Error.throwWithStackTrace(
Exception(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hrm...I hate losing the original exception details. I like this idea, though.

Do we have a standarding "inner error" thing somewhere here?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In our case the error will be a "Failed lookup" error. I'm not sure there's a lot of value.
The stacktrace is preserved, so it should point to what originally threw

I'm not sure how we'd better preserve the chain of error. I'm not aware of an official Dart solution to this problem.
In JS we have that cause field`, but not in Dart? 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants