Skip to content

fix: handling proxy responses for tiktok_ads, snapchat_custom_audience - #2169

Merged
sanpj2292 merged 10 commits into
developfrom
fix.tf-proxy-resp-tiktok-ads-snapchat-cust-aud
May 26, 2023
Merged

sanpj2292 merged 10 commits into
developfrom
fix.tf-proxy-resp-tiktok-ads-snapchat-cust-aud

Conversation

@sanpj2292

@sanpj2292 sanpj2292 commented May 14, 2023 •

Copy link
Copy Markdown

Description of the change

  • Fixed response handling for tiktok_ads destination
    • Response status-codes with 502, 500 were getting aborted
  • Refactored snapchat_custom_audience error parsing logic
    • This change had to be made as the changes in processAxiosResponse was creating for this destination's proxy test-cases
  • Fixed the intermediate error parsing(in processAxiosResponse) to return a valid response, when the response exists
    • The error response although was a valid string with 500 status-code, returned empty response("") with 500 status-code(tiktok_ads)
    • The error response although was a valid object(with 403 status-code) without a code, returned empty response("") with 500 status-code(snapchat_custom_audience)

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Related issues

https://www.notion.so/rudderstacks/Error-parsing-for-proxy-Tiktok_ads-Snapchat_custom_audience-1de85800a2c44c6f954c8badc9b017e9?pvs=4

Checklists

Development

  • Lint rules pass locally
  • The code changed/added as part of this pull request has been covered with tests
  • All tests related to the changed code pass in development

Code review

  • This pull request has a descriptive title and information useful to a reviewer. There may be a screenshot or screencast attached
  • "Ready for review" label attached to the PR and reviewers mentioned in a comment
  • Changes have been reviewed by at least one other engineer
  • Issue from task tracker has a link to this pull request

@sanpj2292 sanpj2292 self-assigned this May 14, 2023
@sanpj2292
sanpj2292 requested a review from a team as a code owner May 14, 2023 16:24
@sanpj2292
sanpj2292 requested a review from a team May 14, 2023 16:24
@codecov

codecov Bot commented May 14, 2023 •

Copy link
Copy Markdown

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (f64e30d) 88.58% compared to head (3d9919f) 88.58%.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #2169   +/-   ##
========================================
  Coverage    88.58%   88.58%           
========================================
  Files          508      508           
  Lines        25714    25724   +10     
  Branches      6354     6357    +3     
========================================
+ Hits         22778    22788   +10     
- Misses        2622     2623    +1     
+ Partials       314      313    -1     
Impacted Files Coverage Δ
src/adapters/utils/networkUtils.js 73.58% <100.00%> (+0.50%) ⬆️
...nations/snapchat_custom_audience/networkHandler.js 93.47% <100.00%> (+0.79%) ⬆️
src/v0/destinations/tiktok_ads/networkHandler.js 100.00% <100.00%> (ø)
src/v0/util/index.js 85.35% <100.00%> (+0.01%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

koladilip
koladilip previously approved these changes May 15, 2023

@koladilip koladilip left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, some optional questions/comments

Comment thread src/adapters/utils/networkUtils.js Resolved
@sanpj2292
sanpj2292 requested a review from krishna2020 May 15, 2023 05:53
…to fix.tf-proxy-resp-tiktok-ads-snapchat-cust-aud
ItsSudip
ItsSudip previously approved these changes May 17, 2023
krishna2020
krishna2020 previously approved these changes May 17, 2023
Comment thread src/adapters/utils/networkUtils.js Resolved
utsabc
utsabc previously approved these changes May 18, 2023
Sai Sankeerth added 2 commits May 19, 2023 06:46
…to fix.tf-proxy-resp-tiktok-ads-snapchat-cust-aud
…to fix.tf-proxy-resp-tiktok-ads-snapchat-cust-aud
Comment thread src/v0/util/index.js Resolved
Sai Sankeerth added 2 commits May 26, 2023 16:02
…to fix.tf-proxy-resp-tiktok-ads-snapchat-cust-aud
…to fix.tf-proxy-resp-tiktok-ads-snapchat-cust-aud
@sonarqubecloud

Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

96.9% 96.9% Coverage
0.0% 0.0% Duplication

@sanpj2292
sanpj2292 merged commit 906d799 into develop May 26, 2023
@sanpj2292
sanpj2292 deleted the fix.tf-proxy-resp-tiktok-ads-snapchat-cust-aud branch May 26, 2023 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants