Skip to content

Tech debt

SimpleCertifiedMail's only in-repository integration, getCertifiedLabel, has real callers and real consequences on failure, which makes its resilience and error-handling gaps more significant than in the library's other three (unused) SOAP client proxies.

CRITICAL

(none identified)

HIGH

Finding Component Impact Recommended action
Transport, fault, and timeout exceptions are not handled anywhere in the call chain SimpleCertifiedMailServiceProxy.GetCertifiedLabel (SimpleCertifiedMailServiceProxy.cs:131); SubpoenaLabelService.GenerateRecipientLabels/GenerateOpposingCounselLabel catch only SimpleCertifiedException A CommunicationException or TimeoutException propagates uncaught; WitnessSubpoenaProcess has no try at all, so an entire batch aborts on a single transport failure Add explicit handling for CommunicationException/TimeoutException/FaultException at the call sites, with the same "skip and notify" behavior used for the in-band failure
No client-side retry or explicit timeout is configured SimpleCertifiedMailServiceProxy.cs:31-41 A transient failure against the third-party service fails the entire batch operation immediately, with no bound on how long a hung call is allowed to run Configure an explicit binding timeout and add a bounded retry policy
Close() is called without an Abort() fallback on a faulted channel SimpleCertifiedMailServiceProxy.cs:159-173 A faulted channel throws CommunicationObjectFaultedException from Dispose(), masking the original failure Add a fault-aware disposal pattern
The runtime endpoint (SimpleCertifiedMailService.Url) is not defined anywhere in this repository's configuration Configuration (searched: environments.xml, all *.config/*.xml) The effective address at runtime cannot be verified from this repository; a host that does not define this key would fail to construct the client Confirm the setting is defined in every consuming host's configuration; consider adding it to environments.xml for consistency with the other proxies in this library
MaxReceivedMessageSize, MaxBufferSize, and MaxArrayLength are all set to int.MaxValue SimpleCertifiedMailServiceProxy.cs:33-35 Removes the guard that protects the process from an oversized response Set explicit, bounded limits appropriate to the largest expected label image
Security.Message.ClientCredentialType = Certificate has no effect under BasicHttpSecurityMode.Transport SimpleCertifiedMailServiceProxy.cs:31,41 The setting suggests certificate-based message security was intended but never configured; no client certificate is set up anywhere in the repository Remove the ineffective setting, or implement certificate-based message security if it is actually required
GenerateOpposingCounselLabel returns the computed LabelSize even when the in-band call fails SubpoenaLabelService.cs:133-140; consumed by OpposingCounselService.cs:135-141 The downstream OpposingCounselService may reference a .gif file that was never written, because the failure path still returns a "successful" size Propagate the failure instead of a size, or have OpposingCounselService verify the file exists before referencing it
The temporary Image returned by Image.FromStream in SaveLabelAsGif is not disposed SimpleCertifiedMailServiceProxy.cs:62 A GDI+ resource leak on every label save Wrap the Image in a using block
GetLabelOnly discards its result and has no callers in the repository SimpleCertifiedMailServiceProxy.cs:46-49 A production-mode call to this method would still generate a (possibly billable) label with no use for it, if ever called* Remove the method, or confirm an external package consumer relies on it

Note: Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts.

Sources

  • Services/SAIF.Services.Web.Proxies/SimpleCertifiedMailServiceProxy.cs
  • Services/SAIF.Services/Legal/Subpoenas/SubpoenaLabelService.cs
  • Services/SAIF.Services/Legal/Subpoenas/OpposingCounselService.cs
  • Services/SAIF.Services/Legal/Subpoenas/WitnessSubpoenaProcess.cs