Investigate - Clients have the ‘Name Request encountered an error’ issue when trying to pay for a request.
Known Bug Workaround identified by Business
Priority 1: We still find clients have the ‘Name Request encountered an error’ issue when trying to pay for a request. I understand this may be localized to individual’s computers, but it’s an ongoing issue that is deeply frustrating for clients, and difficult for us as examiners, especially since we can’t offer them an alternative way to pay for a request. Telling them to clear their cache or call Service BC is not always a fix, especially if they’re from a foreign jurisdiction and unable to work with SBC. We need a way to take payment for clients who experience this issue. (Frequency 25%) Time cost: Initial time cost (phones/emails/ticket) approx. 1-2 hrs/week. Residual time cost (follow-up calls/emails/status request/ticket follow-up) approx. 1-2 hrs/week
ticket to Timeboxed for investigation as per estimation attached. Omid to follow up with next approach to resolve as it may require relating with other teams who use the pay system.
Status - Currently being reviewed, @flutistar and @EPortman have already approved the changes.
@shaangill025 let us know if you built this in dev, you can now go ahead and build in test, please start the CD, i will approve, you verify and then we can move it to ready for QA
@shaangill025 / @ozamani9gh - what repo is this code in?
@rarmitag I don't remember reviewing this PR. The PR of @shaangill025 that @flutistar and I reviewed together was 20999.
https://app.zenhub.com/workspaces/names-team-board-new-655554cbddd49510027dad2e/issues/gh/bcgov/entity/20999
Please disregard my earlier comment regarding code review, this was done mistakenly and not meant for this issue. Sorry for the confusion.
I was able to reproduce the issue by:
- In name-request, sign in with BC Service card [test account - BCREG0023]
- Create a Sole prop and pay with test credit card. Note that it happens very rarely: After payment and redirection back to name-request, get the NR encountered error. This error persists and hinders the process to try and create a new NR even after refresh.
Investigation Results
- After redirection from PayBC, there is
sessionPaymentIdandsessionPaymentActionin session storage which triggersfetchData()innamerequest/src/components/dialogs/payment-complete.vue. - https://github.com/bcgov/namerequest/blob/ad2eaeef94abfdf84b69ba68e77c0fa80ba028ce/src/components/dialogs/payment-complete.vue#L112 , this calls
getNameRequest()innamex-services - https://github.com/bcgov/namerequest/blob/ad2eaeef94abfdf84b69ba68e77c0fa80ba028ce/src/services/namex-services.ts#L333 , due to CORS error when calling
/api/v1/namerequestsendpoint it is returning null which is erroring out as shown in the screenshot above - In Namex, https://github.com/bcgov/namex/blob/39c0ba1fae20488e29978a3b279b8ba61c405747/api/namex/resources/name_requests/name_requests.py#L42
@cors_preflight('GET, POST')is declared but maybe additional configuration like specifyingheadersand/ororiginsmay fix this issue
@ozamani9gh
@shaangill025 do you feel comfortable making these code changes, or do you want to work with @eve-git on this ticket this week. i will leave it up to you. but move this back to IN PROGRESS till coding fixes have been applied.
Mihai will update ticket with OPS ticket and the OPS Dev will investigate and reproduce.