Improved error handling and preparation for error logging to be added in a next step:
HttpRequestInterceptor takes care of catching (and later logging) HTTP errors
GlobalErrorHandler takes care of logging client errors
Logging should happen like this:
Send logs to a backend logging endpoint
Based on env settings passed to the Angular build script by an prov-app admin:
Print client errors to the browser console and / or
allow that the users see them "nice" in the app (e.g. via additional icon next to message which displays a modal dialog)
The current behaviour from a user's perspective is to see a meaningful message (without any tech info) while still being able to use the app. For example when for whatever reason the list of quickstarters cannot be loaded, then editing of a project is not possible and the user sees an information about this problem, but is still able to view all project details.
In a next step I'd prepare the possibility to configure an remote logging endpoint and create an Angular service which "fire & forgets" the logs to such an URL.
What do you think? Or do you have other ideas? /cc @stitakis @michaelsauter
(Followup to #527)
Improved error handling and preparation for error logging to be added in a next step:
HttpRequestInterceptor
takes care of catching (and later logging) HTTP errorsGlobalErrorHandler
takes care of logging client errorsLogging should happen like this:
The current behaviour from a user's perspective is to see a meaningful message (without any tech info) while still being able to use the app. For example when for whatever reason the list of quickstarters cannot be loaded, then editing of a project is not possible and the user sees an information about this problem, but is still able to view all project details.
In a next step I'd prepare the possibility to configure an remote logging endpoint and create an Angular service which "fire & forgets" the logs to such an URL.
What do you think? Or do you have other ideas? /cc @stitakis @michaelsauter