Closed gregleongf closed 6 months ago
Hi @gregleongf!
Thank you for your pull request and welcome to our community.
In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.
In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.
Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed
. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.
If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!
@stcheng has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.
@gregleongf thank you for the pull request.
@stcheng merged this pull request in facebook/facebook-nodejs-business-sdk@6a59270f89dbafbf45318b5829ff19f01eaca7d8.
@stcheng The code changes have been reversed by "Auto-generated nodejs SDK code update" https://github.com/facebook/facebook-nodejs-business-sdk/commit/3221b621833c5574a2aea74d4186e0f31c41839a
Hey,
I've tried to add resiliency to the cursor requests and I've found a bug related to params being reset.
Consider the following scenario:
The root of the problem was that the cursor's params were not being properly preserved within the cursor's state, leading to the loss of specified filters and fields upon attempting a retry after an error. This made the retry attempt essentially different from the initial request, lacking the intended specificity.
To resolve this issue, I implemented changes to ensure that params are consistently retained within the cursor's state. The key modifications include:
By making these changes, we preserve the integrity of the cursor requests, maintaining the specified filters and fields across retry requests. The params value will be overwritten only after first successful request. This fix enhances the robustness of data fetching operations, ensuring that the cursor behaves as expected even in scenarios where server responses may be unreliable.