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): fix attempt status for techincal failures in psync flow #2252

Merged
merged 5 commits into from
Sep 22, 2023

Conversation

sai-harsha-vardhan
Copy link
Contributor

Type of Change

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

Description

fix attempt status for techincal failures in psync flow

  1. In Psync flow for 4xx / 5xx errors mark the previous attempt status instead of marking it as processing / failure

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?

  1. 4xx in payments confirm flow, payment status would be marked as failure
    image
    image

  2. 4xx in payments retrieve flow with force_sync = true for processing payment, status is unchanged
    image
    image

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

@sai-harsha-vardhan sai-harsha-vardhan added A-core Area: Core flows C-bug Category: Bug S-waiting-on-review Status: This PR has been implemented and needs to be reviewed labels Sep 21, 2023
@sai-harsha-vardhan sai-harsha-vardhan requested a review from a team as a code owner September 21, 2023 13:03
@sai-harsha-vardhan sai-harsha-vardhan self-assigned this Sep 21, 2023
Comment on lines 318 to 319
if flow_name == "PSync" {
payment_data.payment_attempt.status
Copy link
Member

Choose a reason for hiding this comment

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

here we are not allowing the status to be changed in case of genuine error too, this can be handled by checking the status code and then updating status

Narayanbhat166
Narayanbhat166 previously approved these changes Sep 21, 2023
jarnura
jarnura previously approved these changes Sep 22, 2023
@jarnura jarnura added this pull request to the merge queue Sep 22, 2023
Merged via the queue into main with commit 2b8bd03 Sep 22, 2023
10 checks passed
@jarnura jarnura deleted the fix-psync-technical-failure-status branch September 22, 2023 09:59
@SanchithHegde SanchithHegde removed the S-waiting-on-review Status: This PR has been implemented and needs to be reviewed label Sep 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-core Area: Core flows C-bug Category: Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants