bcgov / entity

ServiceBC Registry Team working on Legal Entities
Apache License 2.0
23 stars 59 forks source link

LTSA PID lookup error handling #14035

Closed RFK250 closed 1 year ago

RFK250 commented 2 years ago

GIVEN I am entering a PID WHEN I enter the value in the modernized system and the PID lookup takes place THEN a call is made to LTSA AND if there is an error I am presented with feedback

Error Scenarios

1) PID does not exist - shows "unable to retrieve PID modal" - verify

2) PID format is invalid - to do - entering fewer than 9 characters and selecting enter from any field should trigger "Enter a valid PID" red error validation/error

3) Any other errors - which are 500 errors that are LTSA internal. From LTSA documentation the only 50x response is 503 - service unavailable. - show "unable to retrieve PID modal" - verify

mstanton1 commented 1 year ago

@PatrickAHeath do you know if there are any documents with the various errors that LTSA could throw? Or is this something that requires analysis?

cc @catherinecarlson

PatrickAHeath commented 1 year ago

Check with Doug as I think he had looked into what LTSA calls and responses look like.

P

From: mstanton1 @.> Sent: Wednesday, November 23, 2022 1:31 PM To: bcgov/entity @.> Cc: Heath, Patrick 1 CITZ:EX @.>; Mention @.> Subject: Re: [bcgov/entity] LTSA PID lookup error handling (Issue #14035)

[EXTERNAL] This email came from an external source. Only open attachments or links that you are expecting from a known sender.

@PatrickAHeathhttps://can01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FPatrickAHeath&data=05%7C01%7Cpatrick.1.heath%40gov.bc.ca%7C778098b8eff249763bca08dacd9a15eb%7C6fdb52003d0d4a8ab036d3685e359adc%7C0%7C0%7C638048358913720038%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=xFvPWyayQWV4Z5xMiajBUC%2BE5qSb535C7ru6KeVmTLI%3D&reserved=0 do you know if there are any documents with the various errors that LTSA could throw? Or is this something that requires analysis?

cc @catherinecarlsonhttps://can01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcatherinecarlson&data=05%7C01%7Cpatrick.1.heath%40gov.bc.ca%7C778098b8eff249763bca08dacd9a15eb%7C6fdb52003d0d4a8ab036d3685e359adc%7C0%7C0%7C638048358913720038%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=UXBnVvDYUD8xUbIViyiVzTGRoHBdls35W0WZhaNZbu4%3D&reserved=0

— Reply to this email directly, view it on GitHubhttps://can01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fbcgov%2Fentity%2Fissues%2F14035%23issuecomment-1325680289&data=05%7C01%7Cpatrick.1.heath%40gov.bc.ca%7C778098b8eff249763bca08dacd9a15eb%7C6fdb52003d0d4a8ab036d3685e359adc%7C0%7C0%7C638048358913720038%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=HDHrEU0yxGBQy9V6mmEpcMZC3Oml%2BDY5ru5L8h0fDqQ%3D&reserved=0, or unsubscribehttps://can01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAST6O5KSYMAMHUMQJ2XMBWTWJ2ELDANCNFSM6AAAAAARPFUY4Q&data=05%7C01%7Cpatrick.1.heath%40gov.bc.ca%7C778098b8eff249763bca08dacd9a15eb%7C6fdb52003d0d4a8ab036d3685e359adc%7C0%7C0%7C638048358913720038%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=sJDDrEgpJdtp%2FaIIOcHpfYUmKQ99Kh3gguiQyNhc768%3D&reserved=0. You are receiving this because you were mentioned.Message ID: @.**@.>>

mstanton1 commented 1 year ago

@doug-lovett do you have a list of the LTSA errors that can be thrown when we do the PID lookup? I'm hoping to create a UI Design ticket and the information on what could error would be needed first.

If not, I can work with Catherine on finding that information.

doug-lovett commented 1 year ago

@mstanton1 we have a wrapped ltsa api service running for our look up. From 11682: Returns a 404 if PID does not exist. Returns a 400 status if the PID is an invalid format. Any other errors are considered LTSA integration/system errors.

The "any other errors" above are any http status code 500 errors which are ltsa internal. From the ltsa documentation the only 50x response is 503 - service unavailable.

mstanton1 commented 1 year ago

@doug-lovett thank you! I will use the information above to create a linked design ticket.

ChasBoucher commented 1 year ago

Reassigned to @dimak1.

This is a more of a confirmation ticket to see if all types of errors are handled.
In my initial testing all error conditions seem to be handled and the correct dialog error is displayed.

PID does not exist - shows "unable to retrieve PID modal" - verify - Passed

PID format is invalid - to do - entering fewer than 9 characters and selecting enter from any field should trigger "Enter a valid PID" red error validation/error - Passed

Any other errors - which are 500 errors that are LTSA internal. From LTSA documentation the only 50x response is 503 - service unavailable. - show "unable to retrieve PID modal" - verify - does return error for any error and does display a message... I am not quite sure if the 500 error is being logged though...

dimak1 commented 1 year ago

@ChasBoucher I tested the PID validation, all seems to be working as expected, as you mentioned.

Screen Shot 2023-01-10 at 3.39.13 PM.png

cc: @tlebedovich

tlebedovich commented 1 year ago

@dimak1 - still to do (related to your note above) is:

  1. PID format is invalid - to do - entering fewer than 9 characters and selecting enter from any field should trigger "Enter a valid PID" red error validation/error

This error is missing. (nothing happens when you hit enter and have less than 9 digits)

And we can use this same error message for your case mentioned above - if the user types in less than 9, goes to review and confirm and then returns, it should also show the "Enter a valid PID" red error message as well so we have a field specific indicator.

tlebedovich commented 1 year ago

@dimak1 - still to do (related to your note above) is:

  1. PID format is invalid - to do - entering fewer than 9 characters and selecting enter from any field should trigger "Enter a valid PID" red error validation/error

This error is missing. (nothing happens when you hit enter and have less than 9 digits)

And we can use this same error message for your case mentioned above - if the user types in less than 9, goes to review and confirm and then returns, it should also show the "Enter a valid PID" red error message as well so we have a field specific indicator.

dimak1 commented 1 year ago

@tlebedovich thanks for clarification. @ChasBoucher I will take care of this fix.

ChasBoucher commented 1 year ago

@dimak1 Sounds good

dimak1 commented 1 year ago

I've updated few things:

@forgeuxGH5 to your comment about validating PID on hitting Enter - we don't verify PID via LTSA until 9 digits are entered, so this would be the same as live UI validation. Together with @tlebedovich we reviewed the existing way PID shows the errors, and it is consistent with other fields (where we wait until the desired length is entered before showing any errors).

tlebedovich commented 1 year ago

looks great,moving to RFQA

chdivyareddy commented 1 year ago

@dimak1 @tlebedovich , the scenario that you mentioned above is not working as expected. Could you please take a look?

  1. PID format is invalid - to do - entering fewer than 9 characters and selecting enter from any field should trigger "Enter a valid PID" red error validation/error.

Currently, the error message "Enter a valid PID" is not triggered when you have less than 9 digits and hit enter.

image.png

And also when the first 3 digits are entered, then the focus automatically shifts to the next field (which is as expected), but when the back button is clicked to clear the input from the first field doesn't work as expected.

tlebedovich commented 1 year ago

@chdivyareddy - as noted above we decided not the trigger the error if user enters less than 9 digits until they go to the review and confirm screen and return here to complete.

not sure what you mean by the back button is clicked to clear the input? what back button? do you mean the keyboard arrow next and back arrow keys?

chdivyareddy commented 1 year ago

@tlebedovich , that clears my question for the first one, thank you!!

And yes, for the second one, I meant the keyboard back arrow keys.

Steps to Reproduce: Enter the first 3 digits of the PID The focus automatically shifts to the next field as expected Now, click the keyboard back arrow key to clear the input which was entered. The focus will not shift to the first PID field to clear the input.

image.png

tlebedovich commented 1 year ago

@chdivyareddy can you put that in a new ticket? I don't think that was part of the AC but would be good to have

dimak1 commented 1 year ago

@chdivyareddy the backspace works only when you have at least one digit entered in the second/third field. If you have no digits in second/third field, backspace will not jump to prev field. Not sure if this was initial requirement to make it that way, but I think it works pretty ok and we should 'live-with' the way we have it now (without putting more dev time into it). Just my opinion. cc: @tlebedovich

mstanton1 commented 1 year ago

@chdivyareddy @tlebedovich I am in agreement with the noted from @dimak1 that the current functionality seems sufficient for a MVP. Are you comfortable to hold off on another ticket and we can asses if iteration is needed when we get this out to users?

tlebedovich commented 1 year ago

for sure

chdivyareddy commented 1 year ago

Created new ticket #15184 for the issue noted and moving this forward!