Return 400 for validation errors without identifier and enable permissive CORS in Development

This commit is contained in:
2026-05-31 19:25:15 +02:00
parent 1e06f60a1b
commit ad9080be66
2 changed files with 11 additions and 4 deletions
+1 -1
View File
@@ -31,6 +31,6 @@ public static class ResultHttpExtensions
private static Dictionary<string, string[]> ToValidationDictionary(IEnumerable<ValidationError> errors) =>
errors
.GroupBy(e => e.Identifier)
.GroupBy(e => string.IsNullOrEmpty(e.Identifier) ? "general" : e.Identifier)
.ToDictionary(g => g.Key, g => g.Select(e => e.ErrorMessage).ToArray());
}