Skip to content

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

Development

Successfully merging this pull request may close these issues.

The error message when clientViaApplicationDefaultCredentials fallbacks to reading metadata servers (and failing) is cryptic

2 participants