Files
Wino-Mail/Wino.Core/Services/GmailSynchronizerErrorHandlingFactory.cs
T

28 lines
1.1 KiB
C#
Raw Normal View History

using Wino.Core.Domain.Interfaces;
2026-02-08 22:20:38 +01:00
using Wino.Core.Synchronizers.Errors;
using Wino.Core.Synchronizers.Errors.Gmail;
namespace Wino.Core.Services;
/// <summary>
/// Factory for handling Gmail synchronizer errors.
/// Registers and routes errors to appropriate handlers.
/// </summary>
public class GmailSynchronizerErrorHandlingFactory : SynchronizerErrorHandlingFactory, IGmailSynchronizerErrorHandlerFactory
{
public GmailSynchronizerErrorHandlingFactory(
GmailAuthenticationFailedHandler authenticationFailedHandler,
GmailQuotaExceededHandler quotaExceededHandler,
GmailRateLimitHandler rateLimitHandler,
2026-02-08 22:20:38 +01:00
GmailHistoryExpiredHandler historyExpiredHandler,
EntityNotFoundHandler entityNotFoundHandler)
{
// Order matters - more specific handlers should be registered first
RegisterHandler(authenticationFailedHandler);
RegisterHandler(quotaExceededHandler);
RegisterHandler(historyExpiredHandler);
2026-02-08 22:20:38 +01:00
RegisterHandler(entityNotFoundHandler);
RegisterHandler(rateLimitHandler); // Most generic rate limit handler last
}
}