singer-io / tap-facebook

Singer.io tap for Facebook Marketing API
GNU Affero General Public License v3.0
110 stars 141 forks source link

Fix for summary param error - Added retry logic #239

Closed sgandhi1311 closed 7 months ago

sgandhi1311 commented 7 months ago

Description of change

Few connections are getting below error -

2024-02-26 14:36:21,288Z    tap -   Status:  400
2024-02-26 14:36:21,288Z    tap -   Response:
2024-02-26 14:36:21,288Z    tap -     {
2024-02-26 14:36:21,289Z    tap -       "error": {
2024-02-26 14:36:21,289Z    tap -         "message": "(#100) Cannot include cost_per_inline_post_engagement, unique_inline_link_click_ctr, frequency, video_play_curve_actions, unique_ctr, ctr, spend, unique_clicks, unique_inline_link_clicks, video_p100_watched_actions, campaign_name in summary param because they weren't there while creating the report run. All available values are: ",
2024-02-26 14:36:21,289Z    tap -         "type": "OAuthException",
2024-02-26 14:36:21,289Z    tap -         "code": 100,
2024-02-26 14:36:21,289Z    tap -         "fbtrace_id": "*************"
2024-02-26 14:36:21,289Z    tap -       }
2024-02-26 14:36:21,289Z    tap -     }

Upon investigation, we discovered that this error originates from Facebook's end. While awaiting a fix from Facebook, we've implemented a workaround on the tap side. We've added retry logic for the aforementioned error message, allowing successful data retrieval upon retrying the request.

Manual QA steps

Risks

Rollback steps