-
Notifications
You must be signed in to change notification settings - Fork 166
LG-7449, Add first error page for inherited proofing when no information is received from API call. #7161
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
LG-7449, Add first error page for inherited proofing when no information is received from API call. #7161
Changes from all commits
fdf8afa
dc07abc
cfd07cd
5e922c3
af997e3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,24 @@ | ||||||
| <%= render( | ||||||
| 'idv/shared/error', | ||||||
| type: :warning, | ||||||
| title: t('inherited_proofing.errors.cannot_retrieve.title'), | ||||||
| heading: t('inherited_proofing.errors.cannot_retrieve.heading'), | ||||||
| ) do %> | ||||||
| <p> | ||||||
| <%= t('inherited_proofing.errors.cannot_retrieve.info') %> | ||||||
| </p> | ||||||
|
|
||||||
| <%= link_to t('inherited_proofing.buttons.try_again'), root_url, class: 'usa-button usa-button--big usa-button--wide' %> | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should the "Try again" be going to a page for the user to try again, rather than the root URL?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @aduth Yes, that work(page which does asynchronous api call) is still in progress and this is a placeholder for now. |
||||||
|
|
||||||
| <%= render( | ||||||
| 'shared/troubleshooting_options', | ||||||
| heading: t('components.troubleshooting_options.default_heading'), | ||||||
| options: [ | ||||||
| { | ||||||
| url: 'https://www.va.gov/resources/managing-your-vagov-profile/', | ||||||
| text: t('inherited_proofing.troubleshooting.options.get_va_help'), | ||||||
| new_tab: true, | ||||||
| }, | ||||||
| ].select(&:present?), | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There's only one option, and it's not conditional, so I don't think we need the filtering here.
Suggested change
|
||||||
| ) %> | ||||||
| <% end %> | ||||||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -364,6 +364,7 @@ | |
| get '/:step' => 'inherited_proofing#show', as: :step | ||
| put '/:step' => 'inherited_proofing#update' | ||
| get '/return_to_sp' => 'inherited_proofing#return_to_sp' | ||
| get '/errors/no_information' => 'inherited_proofing#no_information' | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Even if there's no logic associated with the route, conventionally it's preferred to at least include an empty method for the action in the controller, so that it's more obvious what actions exist when looking at the controller implementation. class InheritedProofingController
# ...
def no_information; end
end
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I tried testing this locally by going directly to http://localhost:3000/verify/inherited_proofing/errors/no_information, only to see a 500 error
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @aduth I actually first added that method to controller and then removed it thinking that preferred. Ex. no_camera action on doc_auth/errors . I will re add it.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We have a future tasks for adding before_filters but I added before_action :confirm_two_factor_authenticated to redirect away from that
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. With a nested route like this, typically I'd expect this to be broken out to a separate controller, rather than funneling all the routes through a single controller (e.g.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We probably will move this to the other ErrorController and Error handling work that Jeff is working on.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you link me to the related ticket which tracks that work?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @aduth The error handling methodology mentioned here, in this PR conversation, is being worked in LG-7257. You and I had a discussion about the implementation, on the 7th of this month; specifically about creating InheritedProofingErrorsController. I am waiting for this PR code to be merged, so that I can integrate the error controller. |
||
| end | ||
|
|
||
| namespace :api do | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may be able to resolve this issue by reordering the
includes instead, sinceIdvSessionis already checking that the user is authenticated, but it's not being reached sinceFlowStateMachineis where the error is happening.