oasp / oasp4js

OASP4JS deprecated repository
Apache License 2.0
9 stars 161 forks source link

Error handling #54

Closed mmatczak closed 8 years ago

mmatczak commented 9 years ago

Implement an error response interceptor which understands the server protocol (as implemented in https://github.com/oasp/oasp4j/blob/033faefe7052debc5d772a79a946eadfac181e20/oasp4j-modules/oasp4j-rest/src/main/java/io/oasp/module/rest/service/impl/RestServiceExceptionFacade.java) and shows a growl message. Also, any unexpected errors should be handled (e.g. logged out to the console and shown as growl message).

For growl messages use https://github.com/JanStevens/angular-growl-2.

maybeec commented 9 years ago

What means "unexpected error"? What are you able to catch? Is there any possibility to also catch i.e. null access errors? I do not think so. So what will be catched by the current interceptor? This should be somehow documented precisely.

hohwille commented 9 years ago

IMHO here "unexpected error" means any unexpected client side exception. This includes null pointers (JS NPE). There is no problem with catching exceptions in JS. Documentation should be in wiki and not here. However, general aspects are

maybeec commented 9 years ago

:+1: I was not aware of the ability to catch errors like null pointer access in JS. Nice to have this in a shared ng-module later on!