Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Log that an in-person enrollment is updated when canceled for invalid…
… enrollment or applicant ID (#11195) The `GetUspsProofingResultsJob` fetches the results of USPS enrollments and updates the status of the enrollment and the profile based on the response. When the job updates an enrollment (and associated profile) it is expected to log a `GetUspsProofingResultsJob: Enrollment status updated` event. This is done by calling `#log_enrollment_updated_analytics`. As part of the change in #11186 we identified that `#handle_unexpected_response` response did not log an enrollment update analytics event. This commit adds logging for the cases where `#handle_unexpected_response` is called and enrollments are updated. There are 2 cases where this occurs: - When the enrollment ID is invalid. A `#handle_invalid_enrollment_code` method was added to account for this. - When the applicant unique ID is invalid. A `#handle_invalid_applicant_unique_id` method was added to account for this. I opted to add new methods in this change to match the pattern that is used by other caller of `handle_unexpected_response`: the `handle_expired_status_update` method. All of these methods are called by `handle_bad_request_error` under some condition. [skip changelog]
- Loading branch information