API REST Exception

In this ApiRestException class has some static method which will allow you to throw RunTime Exception from anywhere. You can throw this ApiRestException RunTime exception from anywhere as well.

Available methods

  • static void notFound()

  • static void unauthorized()

  • static void otherError(String errorMessage)

  • static void error(String message)