Consistent error handling in frontend
Description / Overview
Provide a reliable and consistent way to handle errors coming from the backend and present them to the user.
Use cases
The user has a better expierience using the application as they should mostly be able to identify the problem themselfes. Also there is less double validation as the backend will already validate everything that has to be validated so the frontend doesn't have to care about validation.
Links / references
https://github.com/axios/axios#interceptors
Feature checklist
-
Write axios middleware to catch certain errors -
Specify a clear way to display erros to the user
(Make sure these are completed before closing the issue, with a link to the relevant commit.)
Edited by Henrik Brosenne