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:
1 parent
f8f5d57c7c
commit
a04238a7f1
2 files changed
+9
-1
No files matched your search
@@ -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}
|
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.
|
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)
|
throw new Error(errMessage)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user