Documentation

(jvx:communication)

REST Exception Handling

This is an old revision of the document!


Our standard REST services come with standard exception handling. This means that all server-side exceptions send the http status code 400 (Bad Request) to the client. The implementation already checks some exception types and returns custom http status codes:

Exception http status
UnknownObjectException 404 (not found)
SecurityException 403 (forbidden)
InvalidPasswordException 401 (unauthorized)

If you want custom status codes, it's possible to throw RestServiceException. This Exception class supports custom status codes and error messages.

This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.More information