fix(payment): ensure that payment error is captured in logger (#10506)
what: - when an error occurs upon retrieving a provider, log the original error through the logger Helps https://github.com/medusajs/medusa/issues/10500 in debugging.
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@medusajs/payment": patch
|
||||
---
|
||||
|
||||
fix(payment): ensure that payment error is captured in logger
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user