Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The `UspsLocationsController` is used to search for USPS locations where the user can go to do in-person proofing. This action involves making a request to a USPS API that occasionally errors. We have a method for scrubbing the sponsor ID from the message to avoid exposing it in logs. The method for scrubbing the sponsor ID assumed that the sponsor ID would be present under a property named `responseMessage`. We have observed some errors where the `responseMessage` property is not present. This leads to a `NoMethodError` when we try to scrub the sponsor ID from nil. This commit adds a condition to avoid the error case above. [skip changelog] Co-authored-by: Eileen McFarland <[email protected]>
- Loading branch information