CleanAddressErrorHelper¶
Static helper that decodes the concatenated two-character USPS/CorrectAddress error-code string returned by the address-cleansing web service into a parallel list of codes and their corresponding human-readable descriptions, per the CorrectAddress user manual (v9.0, page C-2).
Purpose¶
- Splits a packed USPS error-code string into individual two-character codes.
- Translates each USPS error code into its documented description (e.g., "City name corrected", "Foreign address"), defaulting to a generic "code description not available" message for unrecognized codes.
Context¶
- Namespace:
SAIF.Services.Utilities.CleanAddress - Assembly/package:
SAIF.Services(packaged inside theSAIF.SAIFCode.CoreNuGet package)
Public members¶
| Member | Signature | Purpose |
|---|---|---|
| ParseErrors | public static ICleanAddressErrors ParseErrors(string errorCodes) |
Splits errorCodes into two-character chunks and returns an ICleanAddressErrors containing both the codes and their resolved USPS descriptions. |
Behavioral notes¶
- Throws via
Enforce.ArgumentNotNulliferrorCodesis null, before any parsing occurs. - The private
GetUspsErrorDescriptionswitch statement hard-codes ~50 USPS-documented error codes; any code not in that table returns"<code> - Code description not available"rather than throwing.
Sources¶
- Services/SAIF.Services/Utilities/CleanAddress/CleanAddressErrorHelper.cs