Skip to content

Improve RsapiDao GetResultData method #150

Description

@Arithmomaniac

Currently, method give little detail on error.

A more robust solution would do something like this:

private static string GenerateMessage(string globalErrorMessage, List<Result<T>> failureItems)
{
	var sb = new StringBuilder(globalErrorMessage ?? "One or more results failed.");
	foreach (var message in failureItems.Select(x => $"- {x.Message}"))
		sb.AppendLine().Append(message);
	return sb.ToString();
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions