You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'am trying to use the sync function but I always got undefined as my return value.
While debugging I eventually saw that the returned object of the getData function does not match the expected AxiosResponse type but is actually the REST API response as defined in the documentation https://www.contentstack.com/docs/developers/apis/content-delivery-api#initial-sync
So, response.data is always undefined which also leads to a type error while evaluating the while statement when setting the recursive parameter to true
Uncaught TypeError: Cannotuse 'in' operator to search for 'pagination_token' inundefined
Thanks for the detailed explanation and for sharing your findings.
You’re right that the sync API response does not follow the standard AxiosResponse structure, which leads to response.data being undefined and causes the error when recursive is set to true.
We’ll be checking this on our end and will update the issue once we have more details.
Thanks for bringing this to our attention 👍
@danny-schoeter Confirmed fixed by a later change to the sync implementation, which corrected the response typing/destructuring — synchronization() now types the getData result as the unwrapped sync response instead of an AxiosResponse, and checks pagination_token on the correct object. Recursive sync works as expected on current main. Closing — please reopen if you still hit this.
cc: @netrajpatel@OMpawar-21
Activity
nadeem-cs commentedon Jan 29, 2026
Thanks for the detailed explanation and for sharing your findings.
You’re right that the sync API response does not follow the standard AxiosResponse structure, which leads to response.data being undefined and causes the error when recursive is set to true.
We’ll be checking this on our end and will update the issue once we have more details.
Thanks for bringing this to our attention 👍
reeshika-h commentedon Aug 5, 2026
@danny-schoeter Confirmed fixed by a later change to the sync implementation, which corrected the response typing/destructuring — synchronization() now types the getData result as the unwrapped sync response instead of an AxiosResponse, and checks pagination_token on the correct object. Recursive sync works as expected on current main. Closing — please reopen if you still hit this.
cc: @netrajpatel @OMpawar-21