fix(core-flows): payment error handling (#13876)

* fix: payment error handling

* Create dirty-radios-kiss.md

* fix: updated to use isMedusaError

* fix: error message updated and error type corrected

---------

Co-authored-by: William Bouchard <46496014+willbouch@users.noreply.github.com>
Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com>
This commit is contained in:
Govind
2025-11-07 18:27:44 +05:30
committed by GitHub
parent dc6f253d31
commit 5499cd2749
3 changed files with 12 additions and 2 deletions

View File

@@ -2168,8 +2168,8 @@ medusaIntegrationTestRunner({
authorizePaymentSessionSpy.mockImplementation(
(id, context, sharedContext) => {
throw new MedusaError(
MedusaError.Types.INVALID_DATA,
`Throw a random error`
MedusaError.Types.PAYMENT_AUTHORIZATION_ERROR,
`Payment authorization failed`
)
}
)