From 73f518d6a668069af128414ab62877d009b46957 Mon Sep 17 00:00:00 2001 From: Joseph Doherty Date: Sat, 15 Aug 2026 11:59:06 -0400 Subject: [PATCH] chore(transport): delete the dead BundleUnlockRateLimitedException MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Superseded by BundleUnlockThrottledException when register row 44 wired the limiter live and moved the typed exception to Commons so ManagementService's MapFault could curate it. The original type has been unreferenced since — never thrown, never caught, only its own definition — and with row 51 moving BundleLockedException into the same Commons namespace there are now three similarly-named unlock exceptions, one of which does nothing. A future maintainer catching the dead one would silently get no coverage. Solution builds clean with it gone (zero references). Transport 173 passed. --- .../BundleUnlockRateLimitedException.cs | 35 ------------------- 1 file changed, 35 deletions(-) delete mode 100644 src/ZB.MOM.WW.ScadaBridge.Transport/Import/BundleUnlockRateLimitedException.cs diff --git a/src/ZB.MOM.WW.ScadaBridge.Transport/Import/BundleUnlockRateLimitedException.cs b/src/ZB.MOM.WW.ScadaBridge.Transport/Import/BundleUnlockRateLimitedException.cs deleted file mode 100644 index 3e8bd70f..00000000 --- a/src/ZB.MOM.WW.ScadaBridge.Transport/Import/BundleUnlockRateLimitedException.cs +++ /dev/null @@ -1,35 +0,0 @@ -namespace ZB.MOM.WW.ScadaBridge.Transport.Import; - -/// -/// Thrown by when the caller -/// has exceeded the configured per-IP-per-hour unlock attempt cap -/// (). The 429-equivalent -/// signal: the caller must wait for the trailing-hour window to roll forward before -/// another passphrase attempt is accepted. -/// -public sealed class BundleUnlockRateLimitedException : Exception -{ - /// - /// Rate-limit key the limiter rejected the attempt against — the caller IP when - /// supplied, or the bundle's content hash as the architectural fallback (the - /// importer has no IHttpContext dependency by design). - /// - public string ClientKey { get; } - - /// Per-window cap that was reached. - public int Limit { get; } - - /// - /// Initializes a new . - /// - /// The rate-limit key that exceeded its budget. - /// The configured per-window cap. - public BundleUnlockRateLimitedException(string clientKey, int limit) - : base( - $"Bundle unlock rate limit reached ({limit} attempts per hour). " - + "Wait for the trailing-hour window to expire before retrying.") - { - ClientKey = clientKey ?? throw new ArgumentNullException(nameof(clientKey)); - Limit = limit; - } -}