LG-13726 update verify info controller to redirect when pii is missing#11065
LG-13726 update verify info controller to redirect when pii is missing#11065jennyverdeyen merged 1 commit intomainfrom
Conversation
There was a problem hiding this comment.
How does IPP end up in a state where pii is nil at this point? It should already exist?
There was a problem hiding this comment.
I was wondering the same! We observed errors in NewRelic that traced back to pii being nil here. I couldn't reproduce it manually. Not sure if this indicates something bigger worth investigating? Perhaps handling the error here isn't sufficient? Open to discussion!
There was a problem hiding this comment.
For posterity, discussion was continued internally here
There was a problem hiding this comment.
Revisited this, and after investigating the logs I found that a user could cancel their in person proofing flow at the verify info page, exit login.gov, then hit the back button to re-enter login.gov, and hit "keep going" to return to the verify info page, where they would no longer have PII in their session since it was cleared on exit.
So, I've added a before_action to redirect if there is no IPP session data present. This follows the behavior on the remote flow side, where the verify info controller also checks that that the step is valid and otherwise redirects.
WilliamBirdsall
left a comment
There was a problem hiding this comment.
LGTM and tests pass :D
cac2eb7 to
ee94c47
Compare
43d6cc8 to
4e1a5fc
Compare
KeithNava
left a comment
There was a problem hiding this comment.
Awesome work! Thanks for really "digging" into this! 😆
changelog: Bug Fixes, In-person proofing, addresses error that occurs when pii is nil in verify info controller
4e1a5fc to
4007852
Compare
|
Still LGTM! |
🎫 Ticket
Link to the relevant ticket:
LG-13726
🛠 Summary of changes
An error recently surfaced in NewRelic:
undefined method 'merge' for niloccurring in the verify info controller. This error would occur because a possibly nil "pii_from_user "object was being called "merge" upon. This updates the code to check for missing PII before rendering the verify info controller, as well as handle that nil object gracefully and prevent such an the error from breaking the app.📜 Testing Plan
undefined method 'merge' for nilerrorScreen.Recording.2024-08-23.at.8.46.52.PM.mov
Perform the same actions to confirm the fix on this branch:
Screen.Recording.2024-08-23.at.8.41.28.PM.mov
Confirm the tests are passing (spec/controllers/idv/in_person/verify_info_controller_spec.rb) ✅