diff --git a/backend/WebApp.Api/Services/AzureAIAgentService.cs b/backend/WebApp.Api/Services/AzureAIAgentService.cs index ec1e954..3c755f5 100644 --- a/backend/WebApp.Api/Services/AzureAIAgentService.cs +++ b/backend/WebApp.Api/Services/AzureAIAgentService.cs @@ -6,6 +6,7 @@ using OpenAI.Responses; using System.Runtime.CompilerServices; using WebApp.Api.Models; +using System.Linq; namespace WebApp.Api.Services; @@ -376,7 +377,10 @@ private MessageResponseItem BuildUserMessage(string message, List? image var validationErrors = ValidateImageDataUris(imageDataUris); if (validationErrors.Count > 0) { - _logger.LogWarning("Image attachment validation failed: {Errors}", string.Join("; ", validationErrors)); + _logger.LogWarning( + "Image attachment validation failed: {Errors}", + string.Join("; ", validationErrors.Select(e => e.Replace("\r", "").Replace("\n", ""))) + ); throw new ArgumentException($"Invalid image attachments: {string.Join(", ", validationErrors)}"); }