bcgov / entity

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

Mismatch between the error messages. #17953

Open riyazuddinsyed opened 1 year ago

riyazuddinsyed commented 1 year ago

Describe the bug in current situation When the user tries to affiliate an NR whose status is 'Cancelled',then the UI throws an error saying "We couldn't find a name request associated with the phone number or email address you entered. Please try again."Where as the API throws the valid error saying "The specified name request cannot be used."

Steps to reproduce the behavior:

  1. Go to 'https://dev.account.bcregistry.gov.bc.ca/account/2079/business"
  2. Affiliate an ""NR 2352208" with email:"riyazsd707@gmail.com"
  3. Notice the Error message the UI throws as well as the error message from the API.

Screenshots/ Visual Reference/ Source Private Zenhub Image

severinbeauvais commented 1 year ago

Which message is correct? Or which one do you want to see in the UI? I'm not so concerned about the message in the network console because few users will see it.

cc: @seeker25

seeker25 commented 1 year ago

Pretty sure I went over this when I joined your standup

severinbeauvais commented 1 year ago

Can you remind me? (Gray hairs, you know.)

seeker25 commented 1 year ago

There's a few options - in the search show the status of the NR as well, perhaps make it so they can't click on it to add that name request (so they don't run into this issue?), not sure if that would work (don't know how real time SOLR is)

another option would be to change the error to come from the api (fix the dialog, so the error isn't misleading)

another option would be to allow cancelled name requests to be affiliated (they can be affiliated it they are DRAFT or REVIEW etc and then go into CANCELLED somehow I believe) - If you wanted to allowed CANCELLED, this would need to be changed:

https://github.com/bcgov/sbc-auth/blob/b772752c71eee200f2213b36afbaacb997439d3d/auth-api/src/auth_api/services/affiliation.py#L228

I think all of those would require a business decision before coding

severinbeauvais commented 1 year ago

@Mihai-QuickSilverDev Can you please forward or bring up as needed? Thx!

seeker25 commented 1 year ago

John specifically asked me to leave it up to entities, so it's up to you guys what you'd like to do - I don't mind helping out though

janisrogers commented 1 year ago

There is a design for this. I think there was a separate ticket? https://app.uxpin.com/edit/9201205#?id_page=164185926 Private Zenhub Image

severinbeauvais commented 1 year ago

Thanks Janis. The error dialog is shown after the NR is found and selected, ie:

image

This ticket is about the mismatch between the UI error message and the API's returned error message. Do we need to differentiate between the two? Or could there be a generic UI message for all cases?

Note that when I tried it, as staff, I was not prompted for an email address or phone number.

seeker25 commented 1 year ago

Note that when I tried it, as staff, I was not prompted for an email address or phone number.

Expected behaviour - staff can also affiliate to other org's business dashboard without any prompts

SBC STAFF can only affiliate to their own dashboard without being prompted for an email or phone number

severinbeauvais commented 1 year ago

Yes, for sure. I was alluding to the fact that the error, "we couldn't find a name request associated with the phone number or email address you entered", doesn't make sense in this case.