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(refund_list): updated refund list response status code when no refunds found. #974

Merged
merged 3 commits into from
May 2, 2023

Conversation

hrithikesh026
Copy link
Contributor

Type of Change

  • Bugfix

Description

  • Changed refund_list() function in crates/router/src/core/refunds.rs such that it returns only Ok response with Vec of refunds.
  • Added size: usize field to RefundListResponse in crates/api_models/src/refunds.rs just like in PaymentListResponse.

Motivation and Context

"Get Refund List" would send an error response with status code 400 when no refunds are found.
Fixed it so it returns an empty list with status code 200 like "Get Payment List".

How did you test it?

Manual

Checklist

  • I formatted the code cargo +nightly fmt --all
  • I addressed lints thrown by cargo clippy
  • I reviewed submitted code

@hrithikesh026 hrithikesh026 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 Apr 25, 2023
@hrithikesh026 hrithikesh026 self-assigned this Apr 25, 2023
Copy link
Contributor

@Abhicodes-crypto Abhicodes-crypto left a comment

Choose a reason for hiding this comment

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

Schema change requested. Other than that LGTM.

@hrithikesh026
Copy link
Contributor Author

Schema change requested. Other than that LGTM.

@Narayanbhat166 Narayanbhat166 added S-ready-for-merge and removed S-waiting-on-review Status: This PR has been implemented and needs to be reviewed labels Apr 26, 2023
@jarnura jarnura added this pull request to the merge queue May 2, 2023
Merged via the queue into main with commit 4e0489c May 2, 2023
@SanchithHegde SanchithHegde deleted the fix_refund_list_status_code branch May 2, 2023 20:55
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.

5 participants