Skip to content

LG-15440 We couldnt find records matching your address screen #12066

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Apr 22, 2025

Conversation

theabrad
Copy link
Contributor

🎫 Ticket

Link to the relevant ticket:
LG-15440

🛠 Summary of changes

Whenever a user fails InstantVerify, because address can't be verified we want to show them a screen to try to enter their address again.

We still have to wait until the mock proofer is up to test this on the idp.

📜 Testing Plan

Provide a checklist of steps to confirm the changes.

  • Make sure specs pass
  • visit /verify/session/errors/address_warning and confirm changes are made.

👀 Screenshots

Screenshot 2025-04-10 at 11 07 19 AMScreenshot 2025-04-10 at 11 07 29 AM
Screenshot 2025-04-10 at 11 07 37 AM

Screenshot 2025-04-10 at 11 07 44 AM

Sorry, something went wrong.

theabrad added 4 commits April 7, 2025 15:33
changelog: User-Facing Improvements, Doc Auth, add we couldnt find your address screen
Comment on lines 33 to 44
def address_warning
rate_limiter = RateLimiter.new(
user: idv_session_user,
rate_limit_type: :idv_resolution,
)

@step_indicator_steps = step_indicator_steps
@address_path = idv_address_url
@remaining_submit_attempts = rate_limiter.remaining_count
log_event(based_on_limiter: rate_limiter)
end

Copy link
Contributor

@amirbey amirbey Apr 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
def address_warning
rate_limiter = RateLimiter.new(
user: idv_session_user,
rate_limit_type: :idv_resolution,
)
@step_indicator_steps = step_indicator_steps
@address_path = idv_address_url
@remaining_submit_attempts = rate_limiter.remaining_count
log_event(based_on_limiter: rate_limiter)
end
def address_warning
@step_indicator_steps = step_indicator_steps
@address_path = idv_address_url
@remaining_submit_attempts = resolution_rate_limiter.remaining_count
log_event(based_on_limiter: resolution_rate_limiter)
end
# private
def resolution_rate_limter
@resolution_rate_limter ||= RateLimiter.new(
user: idv_session_user,
rate_limit_type: :idv_resolution,
)
end

seems like a refactor opportunity since this rate limiter is being instantiated in 3 places... and then can update failure and warning actions 🤔

Copy link
Contributor

@amirbey amirbey Apr 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for refactoring. While perhaps choosing a different route then the code suggestion, I'm concerned that the path chosen could be more confusing from a readability standpoint because other methods in this controller also using rate_limiter for varying rate_limiter_types. As suggested, I think it would be helpful to rename to distinguish the type of rate limiter being used here ... As opposed to the refactor path chosen, I'd prefer revert to your original implementation when we replicated the same code 3 times ... it's more readable 🙏🏿

Comment on lines 104 to 105
if !residential_resolution_result.success? && (same_address_as_id == 'false' ||
ipp_enrollment_in_progress)
Copy link
Contributor

@amirbey amirbey Apr 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the intention for this change? it appears that same_address_as_id is defined when updating an address during IPP 🤔

Copy link
Contributor

@amirbey amirbey Apr 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

btw, I created an issue to refactor our usage of same_address_as_id

Copy link
Contributor

@anniehirshman-gsa anniehirshman-gsa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot LGTM!

For code review and testing -- the main logic to test is that this error appears if the only failures are due to address checks. If other name, DOB, or SSN failures occur then a user would see the original error content. Thanks!

Comment on lines 67 to 68
def set_resolution_rate_limiter
@resolution_rate_limiter = RateLimiter.new(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
def set_resolution_rate_limiter
@resolution_rate_limiter = RateLimiter.new(
def resolution_rate_limiter
@resolution_rate_limiter ||= RateLimiter.new(

@@ -8,36 +8,37 @@ class SessionErrorsController < ApplicationController

before_action :confirm_two_factor_authenticated_or_user_id_in_session
before_action :confirm_idv_session_step_needed
before_action :set_resolution_rate_limiter, only: [:warning, :address_warning, :failure]
Copy link
Contributor

@amirbey amirbey Apr 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
before_action :set_resolution_rate_limiter, only: [:warning, :address_warning, :failure]

i think it's simpler to just call the rate limiter when needed ... is there a benefit to using the filter here?

Comment on lines 15 to 16
attr_reader :resolution_rate_limiter

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
attr_reader :resolution_rate_limiter

Comment on lines +134 to +136
elsif has_exception && is_address_exception
idv_failure_log_address_warning
redirect_to address_warning_url
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we know that address is the sole error?

@amirbey amirbey self-requested a review April 22, 2025 16:49
@theabrad theabrad merged commit c49eec6 into main Apr 22, 2025
1 check passed
@theabrad theabrad deleted the abrad-lg-15440-address-error branch April 22, 2025 17:39
MrNagoo pushed a commit that referenced this pull request Apr 24, 2025
* add address errors page

* add address proofing exception redirect

* add changelog

changelog: User-Facing Improvements, Doc Auth, add we couldnt find your address screen

* linty mclinterson

* refactor rate limiter code in session_errors_controller

* rename rate limiter to resolution_rate_limiter

* changed to resolution result instead of residential_resolution_result

* add address_exception to resolution result

* move address fail check to verify_info_concern

* linty mclinterson

* rate limiter fixups

* redirect to address warning if there is ONLY an address exception

* lint fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants