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(router): handle JSON connector response parse error #1892

Merged
merged 5 commits into from
Aug 9, 2023

Conversation

AkshayaFoiger
Copy link
Contributor

@AkshayaFoiger AkshayaFoiger commented Aug 8, 2023

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates
  • Documentation
  • CI/CD

Description

Certain connectors (Braintree, Rapyd, Trustpay, Boku) send error response in HTML or string format. This lead to a HE_00 in our system as we try to accept it in a JSON format. Now we have introduced a get_json_deserialized function in router/utils.rs that can be used to handle Json error. Json Error handling is implemented for Trustpay, Rapyd and Braintree. Boku already handles it.

How did you test it?

Screen Shot 2023-08-08 at 5 16 42 PM

Screen Shot 2023-08-08 at 8 16 57 PM

Checklist

  • I formatted the code cargo +nightly fmt --all
  • I addressed lints thrown by cargo clippy
  • I reviewed submitted code
  • I added unit tests for my changes where possible
  • I added a CHANGELOG entry if applicable

@AkshayaFoiger AkshayaFoiger added A-connector-integration Area: Connector integration C-bug Category: Bug R-waiting-on-L1 Review: Waiting on L1 reviewer labels Aug 8, 2023
@AkshayaFoiger AkshayaFoiger requested review from a team as code owners August 8, 2023 06:22
@AkshayaFoiger AkshayaFoiger self-assigned this Aug 8, 2023
crates/router/src/utils.rs Outdated Show resolved Hide resolved
crates/router/src/connector/trustpay.rs Outdated Show resolved Hide resolved
@ArjunKarthik ArjunKarthik added the S-waiting-on-author Status: This PR is incomplete or needs to address review comments label Aug 8, 2023
crates/router/src/connector/braintree.rs Outdated Show resolved Hide resolved
crates/router/src/connector/rapyd.rs Outdated Show resolved Hide resolved
crates/router/src/connector/trustpay.rs Outdated Show resolved Hide resolved
crates/router/src/utils.rs Outdated Show resolved Hide resolved
@AkshayaFoiger AkshayaFoiger added S-waiting-on-review Status: This PR has been implemented and needs to be reviewed and removed S-waiting-on-author Status: This PR is incomplete or needs to address review comments labels Aug 8, 2023
@jarnura jarnura added S-ready-for-merge and removed S-waiting-on-review Status: This PR has been implemented and needs to be reviewed R-waiting-on-L1 Review: Waiting on L1 reviewer labels Aug 8, 2023
@ArjunKarthik ArjunKarthik added this pull request to the merge queue Aug 9, 2023
Merged via the queue into main with commit 393c2ab Aug 9, 2023
11 checks passed
@ArjunKarthik ArjunKarthik deleted the fix/json_deser branch August 9, 2023 06:55
srujanchikke pushed a commit that referenced this pull request Aug 10, 2023
Signed-off-by: chikke srujan <121822803+srujanchikke@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-connector-integration Area: Connector integration C-bug Category: Bug
Projects
No open projects
Status: Merged
Development

Successfully merging this pull request may close these issues.

4 participants