namespace SharepointToolbox.Web.Core.Helpers; /// /// Thrown when a CSOM operation fails with a SharePoint "access denied" /// (System.UnauthorizedAccessException / ServerUnauthorizedAccessException). /// Carries the failing site URL so the elevation coordinator can take site-collection /// admin ownership and retry. Message is the enriched diagnostic from EnrichException. /// public sealed class SharePointAccessDeniedException : Exception { public string SiteUrl { get; } public SharePointAccessDeniedException(string message, string siteUrl, Exception inner) : base(message, inner) { SiteUrl = siteUrl; } }