brianackley001 / budgeting-app-client

React JS Client with MSAL authentication
MIT License
0 stars 0 forks source link

[BUG] - Login Error Message Behavior (PLAID Credentials) #92

Open brianackley001 opened 5 months ago

brianackley001 commented 5 months ago

Expected Behavior

API error message only appears for true error

Actual Behavior

client UI displays Login Credential error when no new error is present in Cosmos DB

Steps to Reproduce the Problem

  1. (PROD) https://budgeting-app-client.azurewebsites.net/
  2. Logout / Refresh browser / Login
  3. "Problem with one of your logins" toast alert message presented
  4. COSMOS DB does not show new error recorded
  5. Accounts page does not show error

Specifications

API Responses

accountbalance

{
    "errors": [
        {
            "display_message": null,
            "error_code": "ITEM_LOGIN_REQUIRED",
            "error_message": "the login details of this item have changed (credentials, MFA, or required user action) and a user login is required to update this information. use Link's update mode to restore the item to a good state",
            "error_type": "ITEM_ERROR",
            "request_id": "ZZxlpJ8XiacjFRQ",
            "suggested_action": null
        }
    ],
    "accounts": [
        {
            "accountId": "5wVm6qaMRRCrLapjNaQAsydexLNEXDF4dn0EA",
            "customName": "",
            "includeAccountTransactions": true,
            "institutionId": "ins_127989",
            "institutionName": "Bank of America",
            "itemId": "7LM893JzaaFKEqoNaqvBHbJ3Zda6kdFQ3Yo6q",
            "balances": {
                "available": 13357.17,
                "current": 142.83,
                "iso_currency_code": "USD",
                "limit": 13500,
                "unofficial_currency_code": null
            },
...

transactionsSync

{
    "message": "Errors occurred during sync.",
    "errors": [
        {
            "error_message": "the login details of this item have changed (credentials, MFA, or required user action) and a user login is required to update this information. use Link's update mode to restore the item to a good state",
            "error_code": "ITEM_LOGIN_REQUIRED",
            "error_type": "ITEM_ERROR",
            "error_requestId": "961d4cBuMd3JRBb"
        }
    ]
}

linkedItems

[
    {
        "item_id": "7LM893JzaaFKEqoNaqvBHbJ3Zda6kdFQ3Yo6q",
        "user_id": "27f80662-7c46-4958-a981-360d6e83cdd4",
        "institution_id": "ins_127989",
        "institution_name": "Bank of America",
        "transactions_cursor": "CAESJXd3a01nbXI0QUFDYWdLTDdiS1o4SERkWmt2TmpRT0l2OTZSbjcaDAjooouwBhDo9e2EASIMCOiii7AGEOj17YQBKgwI6KKLsAYQ6PXthAE=",
        "dateCreated": "Wed, 28 Feb 2024 00:57:58 GMT",
        "dateUpdated": "Thu, 04 Apr 2024 12:56:20 GMT",
        "itemError": {
            "errorCode": "ITEM_LOGIN_REQUIRED",
            "errorMessage": "the login details of this item have changed (credentials, MFA, or required user action) and a user login is required to update this information. use Link's update mode to restore the item to a good state",
            "errorType": "ITEM_ERROR",
            "requestId": "xBAzxBzWf6Cpcn1",
            "dateCreated": "2024-03-07T16:32:31.471Z",
            "isResolved": true,
            "log": [
                {
                    "errorCode": "ITEM_LOGIN_REQUIRED",
                    "errorType": "ITEM_ERROR",
                    "requestId": "xBAzxBzWf6Cpcn1",
                    "errorCreateDate": "2024-03-07T16:32:31.471Z",
                    "errorResolvedDate": "2024-03-26T13:45:15.543Z"
                }
            ]
        }
    },
    {
        "item_id": "Br0qD6y8VmSoOk63km4qfEXXLaj989C9N97AN",
brianackley001 commented 5 months ago

Cosmos DB Query:

SELECT c.linkedItems 
FROM c where c.id='27f80662-7c46-4958-a981-360d6e83cdd4'