bcgov / entity

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

Send PPR correct error message/code from pay-api #11072

Open mstanton1 opened 2 years ago

mstanton1 commented 2 years ago

Assets is working to implement appropriate error messaging for client failures. We are not getting the right error messages/code from the pay-api for all cases (i.e. bcol user revoked just sends back general bcol error). Changes are required to send the correct error message/code.

Error Codes Missing

List of existing codes: https://pay-api-dev.apps.silver.devops.gov.bc.ca/api/v1/codes/errors

JohnamLane commented 2 years ago

@doug-lovett @saravankumarpa Please work together to complete the list of missing error codes then we can estimate the amount of work needed to send them.

jinghualicgi commented 2 years ago

Hi John, we discussed this in Asset meeting, we don't have much more to provide. Please help to improve general error message handling, especially to avoid returning 500 Internal Server Error, thanks @JohnamLane

JohnamLane commented 2 years ago

@jinghualicgi Without specifics, I will once again request that Doug and Saravan work together to determine which errors are missing and which ones are needed moving forward. I have moved this to grooming.

mstanton1 commented 2 years ago

@jinghualicgi can you follow up on status for this ticket? I believe the most recent suggestion was you were going to set up a quick meeting for Doug to touch base with Saravan? As this is holding up our story depending on how long this will take it may make sense to decouple this task from the story so we can move our story along.

jinghualicgi commented 2 years ago

@mstanton1 we had that meeting two weeks ago, Saravan provided an estimate.

saravanpa-aot commented 2 years ago

@chdivyareddy @kialj876 Looks like pay-api is already sending the correct error . Plz find the screenshot

image.png

saravanpa-aot commented 2 years ago

@mstanton1 Talked to @kialj876 .Pay API is sending the correct payload and the fix has to happen in PPR has a few things changed.

Moving to review since @kialj876 is doing testing for additional scenarios.If there are no scenarios , will close the ticket.

kialj876 commented 2 years ago

fyi saravan I will move this ticket along with the story as we test through all the envs

kialj876 commented 2 years ago

hey @saravanpa-aot things are working as expected except for accounts with insufficient funds (i.e. bcol_nsf, pw: xxxxxxxx).

Also BCREG0059 is supposed to be an account without PPR access, but it does have access. I can't remove the ppr role from their account, is there anything you can do to change it?

saravanpa-aot commented 2 years ago

Hey @kialj876

BCREG0059 - DEV/TEST? You could remove PPR from the product_subscription table Do you have

kialj876 commented 2 years ago

Okay sounds good I will remove it for BCREG0059. Will that also prevent them from getting the ppr role in their token though?

saravanpa-aot commented 2 years ago

Okay sounds good I will remove it for BCREG0059. Will that also prevent them from getting the ppr role in their token though?

This is what i can see in the logs for that account

ERROR:bcol_api:ca.bc.gov.bconline.webservices.debitaccount.DebitAccountException: ACCOUNT IS REVOKED
ERROR:bcol_api:{
    'message': 'ACCOUNT IS REVOKED',
    'returnCode': 48
}

So it could be BCOL sending the revoked error messages for the NSF accounts. ^^ @mstanton1

mstanton1 commented 2 years ago

Sent note to hometeam to confirm if there is a distinct error message for NSF.

Updated: The home team has confirmed for the ID we sent that it should show the revoked error message. They have run a quick test using that BCOL ID in COLIN and in COLIN the following error message is shown.

Revoked in COLIN.PNG

chdivyareddy commented 2 years ago

Tracking few scenarios in this ticket that display incorrect info in TEST:

Current Behavior:

image.png

image.png

image.png

image.png

jinghualicgi commented 2 years ago

@mstanton1 Melissa, both Kial and Saravan are not available for this ticket anymore, should we ask Jyoti directly?

mstanton1 commented 2 years ago

@jyoti3286 is there anyone left from Relationships who could support with the remaining work. It looks like in some cases the wrong error message is still coming back. That might also be related to test data so we could also ask to have somebody from the hometeam join a meeting who could look up accounts on the fly?

jyoti3286 commented 2 years ago

@mstanton1 Unfortunately this would have to wait if it requires support from the relationship. We don't have anyone with this knowledge base as of now but you can check with SRE team. They also have lot of things on their plate, so if its urgent, Patrick might be able to help.

mstanton1 commented 2 years ago

@jyoti3286 I will remove the 12.5 Sprint. It'd be helpful to understand how many times BCOL errors are received so we have an idea of impact. @pwei1018 do you know if there is a way to get an understanding of the volume of BCOL errors? If it's not easy, I can check with the business area.

pwei1018 commented 2 years ago

@mstanton1 according to the Sentry

  1. 400 Client Error: BAD REQUEST for url: https://bcol-api.apps.silver.devops.gov.bc.ca/api/v1/payments

image

  1. ca.bc.gov.bconline.webservices.debitaccount.DebitAccountException: ACCOUNT IS REVOKED image

  2. ca.bc.gov.bconline.webservices.debitaccount.DebitAccountException: Invalid Message Response: DFS.. image

  3. Server returned response (500) with invalid XML: Invalid XML content received (AttValue: " or ' e... image

jinghualicgi commented 2 years ago

@mstanton1 Melissa, I removed 12.5 tag, and move this back to Backlog. Please let me know if anything I can follow-up after we have an idea/decision how to move this forward. Thanks

jdyck-fw commented 2 years ago

@jyoti3286 - Do you have a dev working on pay stuff that can dig into this and potentially seek support from Kial for questions as needed? asking for @lmcclung