E-commerce 0.5.8: A failed guest email no longer breaks the checkout
E-commerce 0.5.8 fixes guest checkouts where a failing confirmation email crashed the checkout page after the order was already placed.
After an order is saved, the shop sends the guest’s confirmation email, records the order in the activity log and notifies the shop staff. An error in the email step skipped the other two and crashed the page. The buyer was then sent to a new, empty cart and never saw the order they had just placed, and nobody at the shop was told. This happened in production when an active email template in the database raised an error on every send.
The email step now logs its error and lets the rest go on, so the order is recorded, staff are notified and the buyer sees their order. The activity log wrapper also no longer lets any kind of failure reach the checkout.
Full release notes: E-commerce 0.5.8
0.5.8 · 18 September 2026
Fixed
- A failed guest confirmation email no longer takes the checkout with
it (#59). The three steps that run after the checkout transaction
commits — the guest confirmation email, the order’s activity record,
the operator’s “new order” notification — had one unguarded member, and
it was the one made almost entirely of other people’s code (template
lookup, rendering, SMTP). A raise there skipped the other two, so an
order reached the database with no audit row and nobody told, and it
killed the checkout LiveView: the shopper’s browser reconnected, the
view remounted, found the cart already converted and sent them to a
fresh empty cart, whose “your cart is empty” was all they ever saw
about the order they had just placed.
maybe_send_guest_confirmation/1now rescues and catches, logs aterrorwith the full formatted stacktrace for both kinds, and returns:ok. Seen in production, where an active database email template made core’sContent.resolve/5raiseKeyErroron every send. Activity.log/2no longer lets a thrown value through. The shop’s activity wrapper promises in its own docs that a logging failure can never crash the caller, and caught:exitbut not:throw— in the checkout’s post-commit block that caller is the shopper’s LiveView. It now catches every kind, matchingNotifications.safely/1.
E-commerce 0.5.8. Install or update: {:phoenix_kit_ecommerce, "~> 0.5"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.