-
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
fix(connector): handle unexpected error response from bluesnap connector #7120
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 tasks
deepanshu-iiitu
previously approved these changes
Jan 27, 2025
e7513f4
to
1a62dab
Compare
AkshayaFoiger
approved these changes
Jan 28, 2025
deepanshu-iiitu
approved these changes
Jan 28, 2025
pixincreate
added a commit
that referenced
this pull request
Feb 7, 2025
…unt-configurable * 'main' of github.com:juspay/hyperswitch: (37 commits) refactor(router): add display_name field to connector feature api (#7121) ci(cypress): Add Tests for Customer Deletion and Psync flows (#7158) feat(connector): [DataTrans] ADD 3DS Flow (#6026) chore(version): 2025.02.07.0 chore(connectors): [fiuu] update pm_filters for apple pay and google pay (#7182) feat(router): add `organization_id` in authentication table and add it in authentication events (#7168) fix(dashboard_metadata): mask `poc_email` and `data_value` for DashboardMetadata (#7130) feat(core): Add support for v2 payments get intent using merchant reference id (#7123) refactor(customer): return redacted customer instead of error (#7122) fix(connector): handle unexpected error response from bluesnap connector (#7120) feat(routing): Contract based routing integration (#6761) refactor(dynamic_fields): dynamic fields for Adyen and Stripe, renaming klarnaCheckout, WASM for KlarnaCheckout (#7015) feat(connector): [COINGATE] Add Template PR (#7052) chore(roles): remove redundant variant from PermissionGroup (#6985) refactor(router): store `network_transaction_id` for `off_session` payments irrespective of the `is_connector_agnostic_mit_enabled` config (#7083) chore(connector): [Fiuu] log keys in the PSync response (#7189) ci(cypress): fix nmi and paypal (#7173) chore(version): 2025.02.06.0 chore(postman): update Postman collection files feat(connector): [Deutschebank] Add Access Token Error struct (#7127) ...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Type of Change
Description
The code ensures any unexpected responses from the connector are appropriately logged and handled, providing meaningful and actionable error information to the caller.
Additional Changes
Motivation and Context
The Bluesnap Connector propagates errors received from its cloud service (Cloudflare). Cloudflare returns these errors in HTML format, and Bluesnap forwards them in the same HTML format. When an error is received in HTML format, the backend's deserialization fails because it expects the response to be in JSON format.
How did you test it?
Unable to test 5xx error codes
Normal testing done through postman
Request -
Response -
2A. Payments - Create (Successful Transaction)
Request -
Response -
2B. Payments - Create (Failed Transaction, producing error)
Request -
Response -
Cypress Test
Checklist
cargo +nightly fmt --all
cargo clippy