Skip to content

fix(connector): [adyen] refund sync error message#13152

Open
AkshayaFoiger wants to merge 2 commits into
mainfrom
adyen-error-fix
Open

fix(connector): [adyen] refund sync error message#13152
AkshayaFoiger wants to merge 2 commits into
mainfrom
adyen-error-fix

Conversation

@AkshayaFoiger

Copy link
Copy Markdown
Contributor

Type of Change

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

Description

Earlier this is the error we got when we try to do a force Rsync.

image

Now the error message is fixed

How did you test it?

Create a refund with adyen

curl --location 'http://localhost:8080/refunds' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_Zal39GC8aTRGqmAnHF9ZsWVwoBBQYPAN5pQgamTVEsBXTWgufK2kj3IgDGGW55Y9' \
--data '{"payment_id":"pay_mRbcZ3G1q3PAL2Lq5MLw","amount":600,"reason":"Customer returned product","refund_type":"instant","metadata":{"udf1":"value1","new_customer":"true","login_date":"2019-09-10T10:11:12Z"}}'

Response

{
    "refund_id": "ref_5BHQXAGKQIPRRtYFmDPv",
    "payment_id": "pay_mRbcZ3G1q3PAL2Lq5MLw",
    "amount": 600,
    "currency": "USD",
    "status": "pending",
    "reason": "Customer returned product",
    "metadata": {
        "udf1": "value1",
        "new_customer": "true",
        "login_date": "2019-09-10T10:11:12Z"
    },
    "error_message": null,
    "error_code": null,
    "unified_code": null,
    "unified_message": null,
    "created_at": "2026-07-03T07:21:34.761Z",
    "updated_at": "2026-07-03T07:21:35.067Z",
    "connector": "adyen",
    "profile_id": "pro_wIXI1oOHu593T0qtYGw0",
    "merchant_connector_id": "mca_RZM7mG61wTYVsEfNyqky",
    "split_refunds": null,
    "issuer_error_code": null,
    "issuer_error_message": null,
    "raw_connector_response": null,
    "connector_refund_id": "GG7R5LW7DLSCLR75"
}

Rsync with force sync true

curl --location 'http://localhost:8080/refunds/ref_5BHQXAGKQIPRRtYFmDPv?force_sync=true' \
--header 'Accept: application/json' \
--header 'api-key: dev_Zal39GC8aTRGqmAnHF9ZsWVwoBBQYPAN5pQgamTVEsBXTWgufK2kj3IgDGGW55Y9'

Response

{
    "error": {
        "type": "invalid_request",
        "message": "Refund Sync flow is not implemented",
        "code": "IR_00"
    }
}

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

@AkshayaFoiger AkshayaFoiger requested a review from a team as a code owner July 3, 2026 07:46
@semanticdiff-com

semanticdiff-com Bot commented Jul 3, 2026

Copy link
Copy Markdown

Review changes with  SemanticDiff

Changed Files
File Status
  crates/hyperswitch_connectors/src/connectors/adyen.rs  97% smaller

@AkshayaFoiger AkshayaFoiger self-assigned this Jul 3, 2026
Vani-1107
Vani-1107 previously approved these changes Jul 3, 2026
swangi-kumari
swangi-kumari previously approved these changes Jul 3, 2026
@hyperswitch-bot hyperswitch-bot Bot dismissed stale reviews from swangi-kumari and Vani-1107 via f86a253 July 3, 2026 07:56
@XyneSpaces

Copy link
Copy Markdown

Review Findings

This PR makes a minor string cleanup in the Adyen connector's refund sync error message. No blocking issues found.

[nit] String consistency

The error message format "Refund Sync flow" is now consistent with other connector error messages. Consider verifying that this pattern is applied to other connectors with similar NotImplemented errors for consistency.

@XyneSpaces

Copy link
Copy Markdown

dummy

@XyneSpaces

Copy link
Copy Markdown

💡 Error message change removes clarity about "not implemented"

The error message change from "Refund Sync flow not Implemented" to "Refund Sync flow" removes the explicit indication that this is an unimplemented feature. The new message could be interpreted as a generic error rather than a deliberate "not implemented" response.

Consider keeping the explicit indicator: "Refund Sync flow (not implemented)" or "Refund Sync flow — not supported".

@XyneSpaces

Copy link
Copy Markdown

test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants