Skip to content

Conversation

@srujanchikke
Copy link
Contributor

@srujanchikke srujanchikke commented Oct 26, 2023

Type of Change

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

Description

Error reason mapping in paypal fails when description for error reason is empty string .Because current implementation uses then_some , which returns Some(t) if the bool is [true], or None otherwise. So error_reason always set to None .This pr fixes this issue and set the error reason to paypal's error message if error reason is empty string.

Additional Changes

  • This PR modifies the API contract
  • This PR modifies the database schema
  • This PR modifies application configuration/environment variables

Motivation and Context

How did you test it?

Can't test this if paypal sends empty string in
PaypalPaymentErrorResponse -> details -> description then this will be mapped to PaypalPaymentErrorResponse-> message . Although it have same test case as this pr #2611 to test the previous error mapping .

Checklist

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

@srujanchikke srujanchikke added A-connector-integration Area: Connector integration C-bug Category: Bug labels Oct 26, 2023
@srujanchikke srujanchikke self-assigned this Oct 26, 2023
@srujanchikke srujanchikke requested a review from a team as a code owner October 26, 2023 13:05
@github-actions github-actions bot added the S-conventions-not-followed Status: This PR does not follow contributing guidelines label Oct 26, 2023
@srujanchikke srujanchikke changed the title fix paypal error reason mapping fix(connector)[Paypal] : fix paypal error reason mapping when it is empty string Oct 26, 2023
@srujanchikke srujanchikke changed the title fix(connector)[Paypal] : fix paypal error reason mapping when it is empty string fix(connector)[Paypal]: fix paypal error reason mapping when it is empty string Oct 26, 2023
@srujanchikke srujanchikke changed the title fix(connector)[Paypal]: fix paypal error reason mapping when it is empty string fix(connector): [Paypal]fix paypal error reason mapping when it is empty string. Oct 26, 2023
@github-actions github-actions bot removed the S-conventions-not-followed Status: This PR does not follow contributing guidelines label Oct 26, 2023
@srujanchikke srujanchikke added the S-waiting-on-review Status: This PR has been implemented and needs to be reviewed label Oct 26, 2023
@likhinbopanna likhinbopanna added this pull request to the merge queue Oct 26, 2023
Merged via the queue into main with commit 2c00767 Oct 26, 2023
@likhinbopanna likhinbopanna deleted the paypal_fix branch October 26, 2023 13:49
@SanchithHegde SanchithHegde removed the S-waiting-on-review Status: This PR has been implemented and needs to be reviewed label Nov 5, 2023
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

None yet

Development

Successfully merging this pull request may close these issues.

5 participants