Errors in NewRelic revealed that some USPS exceptions include a response body with a String instead of a hash, but we were assuming the body would be a hash in our method to scrub it for sponsor ID, causing the error undefined method 'with_indifferent_access' for instance of a String.
This accepts a String and still ensures that it is scrubbed of a sponsor ID.
🎫 Ticket
Link to the relevant ticket: LG-14492
🛠Summary of changes
Errors in NewRelic revealed that some USPS exceptions include a response body with a String instead of a hash, but we were assuming the body would be a hash in our method to scrub it for sponsor ID, causing the error
undefined method 'with_indifferent_access' for instance of a String
.This accepts a String and still ensures that it is scrubbed of a sponsor ID.
📜 Testing Plan