Skip to content
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(payment): ensure that payment error is captured in logger #10506

Merged
merged 1 commit into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/clever-experts-ring.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@medusajs/payment": patch
---

fix(payment): ensure that payment error is captured in logger
5 changes: 4 additions & 1 deletion packages/modules/payment/src/services/payment-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@ export default class PaymentProviderService extends ModulesSdkUtils.MedusaIntern
Unable to retrieve the payment provider with id: ${providerId}
Please make sure that the provider is registered in the container and it is configured correctly in your project configuration file.
`
this.#logger.error(errMessage)

// Ensure that the logger captures the actual error
this.#logger.error(e)

throw new Error(errMessage)
}
}
Expand Down
Loading