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

fix(.NET): Improve Collection of Errors string #1534

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

Conversation

texastony
Copy link
Contributor

Issue #, if available:

Collection of Errors is a frustrating error because it requires customer action
to completely serialize it into logs.

We can make a simple fix in .NET to improve the CX,
by always serializing the list into the Collection Of Error's
message.

We concatenate the given error message with
a serialization of all the nested errors.

See similar PR for MPL-Java: aws/aws-cryptographic-material-providers-library@9e195a1

Squash/merge commit message, if applicable:

fix(.NET): Improve Collection of Errors string 

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@texastony texastony requested a review from a team as a code owner December 23, 2024 23:02
public CollectionOfErrors(string message) : base(message) { this.list = new System.Collections.Generic.List<Exception>(); }
public CollectionOfErrors() : base("CollectionOfErrors") { this.list = new System.Collections.Generic.List<Exception>(); }
private static string ListAsString(List<Exception> list)
Copy link
Member

Choose a reason for hiding this comment

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

Do we need to import System.Collections.Generic.List or use System.Collections.Generic.List<Exception> instead of List<Exception>?

Copy link
Member

Choose a reason for hiding this comment

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

here and other places

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