Create Mixin to map system to friendly error messages
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"]
.
To provide the customers with more meaningful errors, we created a dictionary (i.e. a JavaScript object) that maps unfriendly/system to friendly errors.
This Issue introduces a method/Mixin that maps the received system error to the friendlier one by leveraging the dictionary created with #386710 (closed).
Edited by Angelo Gulina