diff --git a/ProjectLighthouse/Extensions/ControllerExtensions.cs b/ProjectLighthouse/Extensions/ControllerExtensions.cs index 9c561116..1afd3085 100644 --- a/ProjectLighthouse/Extensions/ControllerExtensions.cs +++ b/ProjectLighthouse/Extensions/ControllerExtensions.cs @@ -102,8 +102,9 @@ public static partial class ControllerExtensions if (matchedRoot == null) { Logger.Error($"[{controller.ControllerContext.ActionDescriptor.ActionName}] " + - $"Failed to deserialize {typeof(T).Name}: Unable to match root element", LogArea.Deserialization); - Logger.Error($"{bodyString}", LogArea.Deserialization); + $"Failed to deserialize {typeof(T).Name}: Unable to match root element\n" + + $"xmlData: '{bodyString}'", + LogArea.Deserialization); return default; } root = new XmlRootAttribute(matchedRoot); @@ -116,8 +117,10 @@ public static partial class ControllerExtensions catch (Exception e) { Logger.Error($"[{controller.ControllerContext.ActionDescriptor.ActionName}] " + - $"Failed to deserialize {typeof(T).Name}: {e.Message}", LogArea.Deserialization); - Logger.Error($"{bodyString}", LogArea.Deserialization); + $"Failed to deserialize {typeof(T).Name}:\n" + + $"xmlData: '{bodyString}'\n" + + $"detailedException: '{e.ToDetailedException()}", + LogArea.Deserialization); } return default; } diff --git a/ProjectLighthouse/Types/Entities/Profile/Photo.cs b/ProjectLighthouse/Types/Entities/Profile/Photo.cs index 10651d3e..a6d8c797 100644 --- a/ProjectLighthouse/Types/Entities/Profile/Photo.cs +++ b/ProjectLighthouse/Types/Entities/Profile/Photo.cs @@ -60,6 +60,7 @@ public class Photo [XmlElement("plan")] public string PlanHash { get; set; } = ""; + [XmlIgnore] public virtual ICollection PhotoSubjects { get; set; } = new HashSet(); public int CreatorId { get; set; }