Skip to content
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

Handle errors during in-person enrollment #2345

Closed
9 tasks done
angela-tran opened this issue Sep 10, 2024 · 4 comments · Fixed by #2382
Closed
9 tasks done

Handle errors during in-person enrollment #2345

angela-tran opened this issue Sep 10, 2024 · 4 comments · Fixed by #2382
Assignees

Comments

@angela-tran
Copy link
Member

angela-tran commented Sep 10, 2024

A system error is when something goes wrong on the transit processor's side, which translates to us getting back a 500 error.

A server error is when we probably did something to make the API request fail, which translates to us getting back a 400 error or some other Exception.

A re-enrollment error is simply when the user is trying to re-enroll a card and are not yet in the window for re-enrolling it.

Lastly, if all systems are working but for some reason the transit processor system said that verification of the card failed, we ask the user to retry this is a user enrollment error.

This ticket requires a refactor to benefits.enrollment.views.token to extract logic for calling the API out to the enrollment module. was done as a part of #2244

Acceptance Criteria

  • Sentry notifications are sent for all error cases

The in_person/enrollment/system_error.html template is implemented and shown for:

  • 500 errors from retrieving an access token
  • 500 errors from trying to enroll the card into a group
  • 500 errors returned in the onError callback on the transit processor Javascript function

The in_person/enrollment/server_error.html template is implemented and shown for:

  • 400 errors or other Exceptions from retrieving an access token
  • 400 errors or other Exceptions from trying to enroll the card into a group
  • 400 errors returned in the onError callback on the transit processor Javascript function

The in_person/enrollment/reenrollment_error.html template is implemented and shown when:

  • the enroll function returns a Status of REENROLLMENT_ERROR

The in_person/enrollment/retry.html template is implemented and shown when:

  • the onVerificationFailure callback is invoked

Additional context

#2066 has more history / context on distinguishing out enrollment errors.

@angela-tran angela-tran changed the title Handle system errors during in-person enrollment Handle errors during in-person enrollment Sep 10, 2024
@angela-tran
Copy link
Member Author

@indexing - it looks like we are missing a Miro mock-up for the "server error" case.

@angela-tran
Copy link
Member Author

Getting back to this now!

@angela-tran
Copy link
Member Author

angela-tran commented Sep 20, 2024

Hey @indexing -- thanks for adding the server error mockup to Miro!

I just realized we have one more error screen that's missing. I think this is really the last one.

As described above in this issue's description, the rider-facing app shows a "retry" error screen if Littlepay was not able to verify the rider's contactless payment card. There's a screenshot of it in #1755 (except it's missing the retry button), which I'll embed here too:

I actually can't find this screen in Figma even though it seems like it did exist in Figma at one point (see @thekaveman linking to it in #1903). And it definitely is still in the app.

Ironically enough, this retry page was the one that we used to try out writing use cases: #1762

Would you be able to add a mockup for this in Miro? Let me know if you have any questions on it. Thanks!

I was mislead by the code and template name being retry/retry.html... this page is the "user enrollment error" page! I have all that I need for this ticket in Miro.

@indexing
Copy link
Member

@angela-tran Yes! Ah...naming. I was thinking the "user enrollment error" view replaced the one in the screenshot. Thanks for the confirmation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants