Handle all page-level errors at the parent component level
During purchase, errors are not always meaningful and are easy to understand for the customers. Reasons might be that the backend doesn't send a well-formed mistake or that we don't have control over the error (e.g., when coming from Zuora). E.g., "last_name":["can't be blank"]
.
Implementation proposal
To apply the solution envisioned in #386723 (closed) and #386722 (closed), we need to ensure errors/alerts handling is centralised, that is: all page-level errors are handled in one component. This requires
- removing the creation/displaying of alerts from all children components
- emitting the errors so that they reach the top-level parent component
This strategy is to be applied for both Add-ons and Subscription purchase flows. The components that will handle the alert display are:
Breakdown
Title | MR |
---|---|
Handle all page-level errors at the parent component level (Add-ons flow) | !107909 (merged) |
Handle all page-level errors at the parent component level (subscription flow) | !108190 (merged) |
Handle payment-related errors at the parent component level | !108095 (merged) |
Edited by Angelo Gulina