Adyen / adyen-node-api-library

Adyen API Library for Node.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] AccountHolder Notification type doesn't match actual HTTP payload given error is present

m3co-code opened this issue · comments

Describe the bug

We process notifications of type ACCOUNT_HOLDER_UPDATED (IPlatformsNotifications.AccountHolderUpdateNotification) in our system. We experienced problems processing one of them, with an error being present in the notification. In this case actually mandatory fields according to the API Specification are not set, namely the full content. accountHolderStatus part.

To Reproduce
I'm not sure how to reproduce, I'm appending the notification content here, maybe it helps you.

Expected behavior
Could be either one of:

  • the API documentation / TypeScript types to specify how the shape / behaviour of the payload is in case of errors
  • the notification also carrying the desired payload besides the error

Received Notification Payload

{
  "error": {
    "errorCode": "10_113",
    "message": "Validation error occurred, see invalidFields property"
  },
  "eventDate": "2022-03-01T12:11:34+01:00",
  "eventType": "ACCOUNT_HOLDER_UPDATED",
  "executingUserKey": "admin@XXX",
  "live": true,
  "pspReference": "XXX",
  "content": {
    "invalidFields": [
      {
        "errorCode": 70,
        "errorDescription": "Shareholder does not exist for shareHolderCode: $UUID",
        "fieldType": {
          "field": "AccountHolderDetails.BusinessDetails.shareholderCode",
          "fieldName": "shareholderCode"
        }
      }
    ],
    "accountHolderCode": "$CODE"
  }
}

Desktop (please complete the following information):

  • Server running on Alpine Linux
  • Node Version: v12.22.7
  • @adyen/api-library: 9.0.0

Hi @mjeri,

Thank you for raising this issue.
Unfortunately this repo only concerns the API libraries + the models. Not the actual Notification generation itself.
For any questions regarding the main Adyen Platform please reach out to our tech support for more help and guidance.

Kind Regards,
Wouter
Adyen

Ah ok, so given TypeScript types are wrong or something could be improved on the types, this repo is not the place to go?

Yes, if it concerns the actual responses or behavior of our API's support is the way to go. If it turns out it's library-related anyway, support will get back to us and we'll work out a fix.

Wouter
Adyen

Thanks a lot! Will reach out there :-)