frontends
frontends copied to clipboard
feat(vue-starter-template): api error handler util
This pull request refactors error handling across multiple account-related components by introducing a centralized apiErrorHandler utility. This change simplifies and standardizes how API errors are processed and displayed to users, replacing repetitive error handling code with a single function call. Additionally, unused imports and functions related to error handling are removed from affected files.
Error Handling Refactor
- Added new
apiErrorHandlerutility inutils/validation/rules/errors/apiErrorHandler.tsto handle API errors in a consistent and reusable way across components. - Replaced custom error handling logic in form and account components (
LoginForm.vue,RegistrationForm.vue,NewsletterBox.vue,index.vue,change-email.vue,change-password.vue,profile/index.vue) with calls toapiErrorHandler, streamlining error display and reducing code duplication. [1] [2] [3] [4] [5] [6] [7]
Cleanup of Imports and Unused Functions
- Removed unused
ApiClientErrorimports andresolveApiErrorsfunction calls from components where error handling is now delegated toapiErrorHandler. [1] [2] [3] [4]
Minor Code Consistency
- Adjusted the order of destructuring for
pushSuccessandpushErrorfromuseNotificationsfor consistency inLoginForm.vue.
closes #2077
The latest updates on your projects. Learn more about Vercel for GitHub.
| Project | Deployment | Preview | Updated (UTC) |
|---|---|---|---|
| frontends-demo | Preview | Nov 7, 2025 8:37am | |
| frontends-vue-starter-template | Preview | Nov 7, 2025 8:37am |
1 Skipped Deployment
| Project | Deployment | Preview | Updated (UTC) |
|---|---|---|---|
| shopware-frontends-docs | Nov 7, 2025 8:37am |