Skip to content
This repository has been archived by the owner on Nov 23, 2021. It is now read-only.

Error handling #54

Closed
mmatczak opened this issue Sep 23, 2015 · 3 comments
Closed

Error handling #54

mmatczak opened this issue Sep 23, 2015 · 3 comments
Assignees
Milestone

Comments

@mmatczak
Copy link
Member

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.

This was referenced Oct 5, 2015
kalmuczakm added a commit that referenced this issue Oct 5, 2015
@maybeec
Copy link
Member

maybeec commented Oct 7, 2015

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
Copy link
Member

hohwille commented Oct 7, 2015

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

  • user errors from the backend where the client shows the exact message from the backend on the client
  • other errors from the backend that are always wrapped into a generic technical error. This will always lead to the same generic error message on the client ("A technical/unexpected error occurred. We apollogize ...").
  • errors during the transport (XHR errors such as connection refused, timeout, etc.). Depending on status code - mainly the same generic error.
  • user errors on the client - to be discussed. We might have "business exceptions" on the client but this is a very rare case.
  • any other exception on the client is treated as technical error like from the backend. Also generic error message. However IMHO the user should be able to see a slight difference if the error comes from the server or the client.

@maybeec
Copy link
Member

maybeec commented Oct 7, 2015

👍 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!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants