#Where to handle errors?
1 messages · Page 1 of 1 (latest)
There are various kinds of services, and the answer very much depends on which kind of service you're writing. The code matters.
It's a rest server service. Right now I'm handling the errors in the service and "notifying" components via signals (using the signals in template conditionals to render the loading/error messages)
I have no idea how you coded, provided and used this rest server service. And all those details matter.
REST API's Error's should always be handled on the compoent level just write a common error handler function and call it there
Another approach would be to centralize error handling of your Rest API using an http interceptor. Since it’s a cross-cutting concern