department-of-veterans-affairs / va.gov-team

Public resources for building on and in support of VA.gov. Visit complete Knowledge Hub:
https://depo-platform-documentation.scrollhelp.site/index.html
283 stars 204 forks source link

Production error when ICN is improperly formatted #89619

Closed JRRoof closed 3 months ago

JRRoof commented 3 months ago

Summary

Issue reported by Marcy Nadeau:

Can you check for a specific error in production?
The error would contain this text: Invalid Patient Integration Control Number My automated VAOS test has found an error and I want to know if this same error is happening in production.

Here is the endpoint: https://staging-api.va.gov/vaos/v2/appointments?_include=facilities,clinics&start=2024-06-30&end=2025-08-29&statuses[]=booked&statuses[]=arrived&statuses[]=fulfilled&statuses[]=cancelled

Here is the error:

"failures": [
            {
                "system": "VSP",
                "id": "0100550b-33a5-4a87-b984-4db11bcd55bc",
                "status": "500",
                "code": 6000,
                "message": "There were errors fetching appointments from VSP: Resource types: [appointments, requests]: Invalid Patient Integration Control Number (ICN): 1012667219.; Invalid Patient Integration Control Number (ICN): 1012667219."
            }
        ]
    }
}

There is a JIRA ticket for the staging incident: https://issues.mobilehealth.va.gov/browse/VAOSR-8347

Specs

From @cferris32 Looks like we're seeing that error as well, started about a week ago on the 23rd. According to the log error messages it seems like the issue is with a . getting appended to the ICN so it becomes invalid.

As a safety measure on our side I can work on a fix to scrub the ICN of misc characters like that and double check any related logic we might already have.

The silver lining is that there are only 99 errors of that nature in this timeframe though, which is relatively a very small amount. So I'm not sure what circumstances are causing the ICN to be modified that amount

Steps to Reproduce

Test User:

  1. Go to: URL

Actual Result

Error message received when fetching appointments: "There were errors fetching appointments from VSP: Resource types: [appointments, requests]: Invalid Patient Integration Control Number (ICN): 1012667219.; Invalid Patient Integration Control Number (ICN): 1012667219."

Desired Result

Extra characters following ICN number are removed before retrieving appointments. No error message is returned.

Definition of Done


cferris32 commented 3 months ago

We determined that since this is likely a backend issue, we are going to allow their team time to investigate the issue and figure out a fix for the root cause. We have api changes that will be shelved as a result of this. Closing this ticket out, and we'll be ready to help out more on our end if needed.