using System.Threading; using System.Threading.Tasks; using LaDOSE.Business.Interface; using LaDOSE.Entity; namespace LaDOSE.Business.Provider.SheetsProvider { /// /// The default when GoogleSheets:Writer names nothing usable. Reports itself as /// unconfigured so the API answers 503 with a message the user can act on, rather than /// throwing a NullReferenceException that reaches the browser as an HTML developer page. /// public class DisabledSheetsWriter : ISheetsWriter { public string Name => "Disabled"; public bool IsConfigured => false; public Task WriteTablesAsync(SheetExportRequest request, CancellationToken ct = default) { throw new SheetsExportException(503, "Google Sheets export is not configured on the server. Set GoogleSheets:Writer."); } } }