Does anyone know what’s happening here?
I’m calling the /api/campaign-recipient-estimations/<campaign_id>
endpoint, i first get all the user campaigns and then cycle through each campaign to get it’s recipient estimation, i’m getting this weird error
{
"errors": "
{
"id": "6f3bd40f-6a67-463e-a28c-02061e0e0027",
"status": 404,
"code": "error",
"title": "A server error occurred.",
"detail": "No results or results were out of date. Schedule a new estimation or wait for your estimation to complete.",
"source": {
"pointer": "/data/"
}
}
]
}
It doesn’t happen always though, for most campaigns it works fine, but then fails randomly
This is my axios request config for getting recipient estimation
{
method: 'GET',
url: `https://a.klaviyo.com/api/campaign-recipient-estimations/${args.campaignId}`,
headers: {
accept: 'application/json',
'content-type': 'application/json',
revision: constant.KLAVIYO_API_VERSION,
Authorization: `Klaviyo-API-Key ${args.apiKey}`,
},
}