Skip to content

RequestError with ERR_INVALID_ARG_TYPE #72

@ghost

Description

Hello,

I have (in a production environment only) this kind of error that happens randomly when I try call some methods of the library (using the 1.1.2 version) like the following:

      const mandate = await client.mandates.find(mandateId);

      const { account_number_ending: bankAccountNumberEnding } = await client.customerBankAccounts.find(
        mandate.links.customer_bank_account,
      );

OR

      const { url } = await client.mandatePdfs.create(
        {
          links: {
            mandate: mandateId,
          },
        },
        '',
        {
          'Accept-Language': language || 'en',
        },
      );

The error:

"extensions": {
  "name": "RequestError",
  "code": "GOCARDLESS_ERROR",
  "exception": {
    "name": "RequestError",
    "code": "ERR_INVALID_ARG_TYPE"
  }
}

GOCARDLESS_ERROR is an internal error name, but RequestError and ERR_INVALID_ARG_TYPE are returned by GoCardless.

Do you know where this could come from? It sometimes works like a charm, but then I will have this error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions