square / square-nodejs-sdk

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

POST requests to SearchCatalogItems({}) 400?

Reverendheat opened this issue · comments

I am just getting started, but in a very basic example of:

  try {
    const response = await client.catalogApi.searchCatalogItems({});
    console.log(response.result);
  } catch(error) {
    console.log(error);
  }

I am getting back:

category: 'INVALID_REQUEST_ERROR',
      code: 'BAD_REQUEST',
      detail: 'Value is expected to be map[string]interface {}, but received string (line 1, character 4)'

Is there something I am missing with using the searchCatalogItems() method?

Same thing here, we are using 8.1.1 version and getting the same error for searchCatalogItems. It used to work a couple of weeks ago.

Hi @Reverendheat and @adrianc21 ,

I have checked that in our latest version of the nodejs SDK, this problem has been fixed.

In the future, we suggest asking questions on our Developer Fourms as these forums are monitored by Square employees and your questions will get a response within 48 hours.

Cheers!