openfun / joanie

👛 A headless ERP for education to manage course enrollment/subscription, payment and certificates delivery.
MIT License
20 stars 2 forks source link

Error with payment provider can silently fail #813

Closed lunika closed 3 weeks ago

lunika commented 1 month ago

Bug Report

Problematic behavior

At least with the Lyra payment provider, if a request to the Charge/CreatePayment has an error, the related method (create_payment, create_one_click_payment and maybe create_zero_click_payment) are returning None or False and the error silently fail (but there is an error log).

Expected behavior/code

If there is an error, the payment provider should raise an exception. With an exception, the error never silently fails, it can prevent or at least show a bug. The code calling the payment provider must manage the exceptions.

Additional context/Screenshots

Related to issue #811