Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: error extraction migrated to typescript #2233

Merged
merged 1 commit into from
Jun 2, 2023

Conversation

sanpj2292
Copy link
Contributor

@sanpj2292 sanpj2292 commented Jun 2, 2023

Description of the change

  • made use of the typescript error extraction class

  • updated logic to throw unhandled status code error(in a different way without using UnHandledStatusCodeError class)

  • added test-cases for the unhandled status code case

  • updated the jest configuration to support typescript in javascript

  • updated couple of test-files to move from implicit declaration to explicit declaration

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

Fix #1

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

- updated the jest configuration to support typescript in javascript
- updated couple of test-files to move from implicit declaration to explicit declaration
@sanpj2292 sanpj2292 requested a review from a team as a code owner June 2, 2023 03:10
@sanpj2292 sanpj2292 self-assigned this Jun 2, 2023
@sanpj2292 sanpj2292 requested review from a team and sivashanmukh as code owners June 2, 2023 03:10
@sanpj2292 sanpj2292 requested review from aashishmalik and sandeepdsvs and removed request for a team June 2, 2023 03:10
@sonarcloud
Copy link

sonarcloud bot commented Jun 2, 2023

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

95.7% 95.7% Coverage
0.0% 0.0% Duplication

@codecov
Copy link

codecov bot commented Jun 2, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.01 🎉

Comparison is base (1900e23) 88.57% compared to head (6d7eaac) 88.58%.

Additional details and impacted files
@@                      Coverage Diff                       @@
##           feat.error-enrich-fb-pixel    #2233      +/-   ##
==============================================================
+ Coverage                       88.57%   88.58%   +0.01%     
==============================================================
  Files                             511      510       -1     
  Lines                           25876    25867       -9     
  Branches                         6380     6380              
==============================================================
- Hits                            22919    22915       -4     
+ Misses                           2642     2637       -5     
  Partials                          315      315              
Impacted Files Coverage Δ
src/util/error-extractor/index.ts 92.59% <100.00%> (ø)
...c/v0/destinations/facebook_pixel/networkHandler.js 100.00% <100.00%> (ø)

... and 14 files with indirect coverage changes

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

@sanpj2292 sanpj2292 merged commit 407821c into feat.error-enrich-fb-pixel Jun 2, 2023
@sanpj2292 sanpj2292 deleted the fix.error-extract-ts branch June 2, 2023 16:06
sanpj2292 added a commit that referenced this pull request Jun 5, 2023
…#2018)

* feat: error enrichment to get clear error messages for facebook pixel

* feat: update 500 status-code for error_subcode 99

* fix: update test-cases with relevant error messages

* feat: add more status-codes to the error detail extraction way, add test-cases for them as well

* fix: FB destination responses since it is using fb_pixel network handler

Signed-off-by: Sai Sankeerth <sanpj2292@github.com>

* fix: error message trimmed

* fix: fb proxy unit-tests

* fix: remove TODOs

* fix: builder refactor

Signed-off-by: Sai Sankeerth <sanpj2292@github.com>

* fix: clean-up status-code logic by defaulting to 500 when status-code not available

Signed-off-by: Sai Sankeerth <sanpj2292@github.com>

* fix: remove unnecessary comments

Signed-off-by: Sai Sankeerth <sanpj2292@github.com>

* fix: sonar lint for empty class with a constructor

Signed-off-by: Sai Sankeerth <sanpj2292@github.com>

* fix: error extraction migrated to typescript (#2233)

- updated the jest configuration to support typescript in javascript
- updated couple of test-files to move from implicit declaration to explicit declaration

Co-authored-by: Sai Sankeerth <sanpj2292@github.com>

---------

Signed-off-by: Sai Sankeerth <sanpj2292@github.com>
Co-authored-by: Sai Sankeerth <sanpj2292@github.com>
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.

3 participants