fix(medusa-payment-stripe): Fix error handling (#5991)

This commit is contained in:
Adrien de Peretti
2024-01-04 09:04:43 +01:00
committed by GitHub
parent 3550750975
commit 7f62ab1b58
3 changed files with 14 additions and 8 deletions
@@ -777,5 +777,5 @@ export abstract class AbstractPaymentProcessor implements PaymentProcessor {
export function isPaymentProcessorError(
obj: any
): obj is PaymentProcessorError {
return obj && typeof obj === "object" && (obj.error || obj.code || obj.detail)
return obj && typeof obj === "object" && obj.error && obj.code && obj.detail
}