#charlie

1 messages · Page 1 of 1 (latest)

gusty elkBOT
gilded isle
#

You have to look at that specific field in the object reference of the API documentation to know if it's expandable

#

Unfortunately there isn't a list that I know of that contains all the expandable properties/fields

foggy sonnet
#

I did look and it is expandable. Hence my confusion when getting that error. I assumed data.tiers was the wrong string? If not, this is probably a bug?

#

StripeInvalidRequestError - This property cannot be expanded (data.tiers).

gilded isle
#

Huh, okay yeah that seems wrong. Do you have a request ID for the request that failed?

Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request

foggy sonnet
#

It's not in the logs, because I am making this request on behalf of another account via stripe connect

gilded isle
#

It could be showing up on that account's logs. What is the account's ID?

#

Should look like acct_abc123

foggy sonnet
#

I've got hundreds for you. Here is the most recent from 10-15 min ago acct_1EurfJLeJ2CsHf92

gilded isle
#

Perfect. Taking a look now

foggy sonnet
#

Oh wow. I just realized we are also sending this...

    await stripeClient.events
        .list(
          {
            type: 'price.*',
            expand: ['data.tiers'],
            created: {
              gte: await this.getLastSyncTimestamp(),
            },
          },
          { stripeAccount: this.account.remote_id }
        )
#

maybe you cannot expand it in the events endpoint?

gilded isle
#

Ohhhhhh, okay. That makes way more sense. No, the Events API doesn't allow for expand unfortunately. You'd want to make a Price retrieve call to the Prices endpoint

foggy sonnet
#

Oof. My bad. I just saw the errors in the logs and assumed it was coming from the call to /v1/prices

#

Thanks @gilded isle !