-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
refactor: use hashmap deserializer for generic_link options #5157
Conversation
refactor: use url crate for handling URLs instead of strings in generic_link flows
link: url::Url::parse(url) | ||
.change_context(errors::ApiErrorResponse::InternalServerError) | ||
.attach_printable_lazy(|| { | ||
format!("Failed to parse the payment method collect link - {}", url) | ||
})?, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this URL is going to be an external input (say provided by the merchant), then raising an internal server error may not be suitable. If it is something that we generate, then it can be an internal server error.
Also, is making it a Url
in the other places an option here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By other places, do you mean making it a Url
in storage models?
I have kept the URL specific fields in storage models as a String
. It's going to use Url
in every place (API interface + data injection in HTML) other than storage models
…ror-handling-in-cypress * 'main' of github.com:juspay/hyperswitch: fix: realtime user analytics (#5129) refactor: use hashmap deserializer for generic_link options (#5157) refactor(router): changed payment method token TTL to api contract based config from const value (#5115) feat(router): collect billing details from wallet connector based on the `collect_billing_details_from_wallet_connector` field (#5065)
refactor: use url crate for handling URLs instead of strings in generic_link flows
Type of Change
Description
This PR includes below items
requires_fulfillment
toProcessing
state in payout link's status UIurl
crate instead of StringAdditional Changes
Motivation and Context
How did you test it?
Checklist
cargo +nightly fmt --all
cargo clippy