-
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): Use ConnectorError::InvalidConnectorConfig
for an invalid CoinbaseConnectorMeta
#3168
Merged
Merged
fix(connector): Use ConnectorError::InvalidConnectorConfig
for an invalid CoinbaseConnectorMeta
#3168
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
dbfa22a
chore: removed unnecessary clone
bkontur 276b1d4
fix(connector): use `ConnectorError::InvalidConnectorConfig` for an i…
bkontur 40c78ea
chore: unrelated clippy
bkontur 109e330
Merge branch 'main' into bko-fix-2899
bkontur 12f0664
Merge remote-tracking branch 'origin/main' into bko-fix-2899
bkontur cd400bd
chore: fix clippy for coinbase transformer tests
bkontur 9352adb
Merge branch 'main' into bko-fix-2899
bkontur 9c11db9
Merge remote-tracking branch 'origin/main' into bko-fix-2899
bkontur 1f14cb3
chore: undo requested changes
bkontur 54cf926
refactor: move test `coinbase_payments_request_try_from_works` from `…
bkontur 3e83c44
Merge remote-tracking branch 'origin/main' into bko-fix-2899
bkontur 0bc0674
chore: address pr review - change error message to `metadata`
bkontur 7154951
chore: fmt
bkontur f1f1ca2
Merge branch 'juspay:main' into bko-fix-2899
bkontur 0fa74d2
Merge branch 'juspay:main' into bko-fix-2899
bkontur f4e1512
Update crates/router/src/core/admin.rs
bkontur 5df2ef4
chore: address pr review comments
bkontur 56d7303
chore: fmt
bkontur File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Oops, something went wrong.
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.
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.
This changes will impact previous merchants who are using coinbase, This PR needs data migrations. Could you please refer #2746 description for more info.
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.
Issue#2899 does not mention any data migrations.
I've checked that #2746, and in that case, the migration involved replacing
terminalId
withterminal_id
due to the removal of#[serde(rename_all = "camelCase")]
here.However, my issue is different. If I understand correctly, this issue is about empty JSON for
CoinbaseConnectorMeta
or the absence of thepricing_type
attribute in the JSON, and the goal is to add validations to prevent storing invalidCoinbaseConnectorMeta
.So, I am not sure about the migration here. If empty JSON or JSON without
pricing_type
is stored, how should the migration to the correctCoinbaseConnectorMeta
be handled? What value should be set forpricing_type
?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.
No worries, We will take this up as these are data migrations. FYI, I was talking about existing merchants, we need to add
pricing_type
in metadata and set it to empty string. In that case, when merchant tries to make payment connector throws error and they are expected to update the metadata.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.
@srujanchikke aha, ok, thank you, make senses now, so I prepared migration script and simple test demonstration that it works, please see PR description.