/** Returns the rest status code associated with this exception. */
 public RestStatus status() {
   Throwable cause = unwrapCause();
   if (cause == this) {
     return RestStatus.INTERNAL_SERVER_ERROR;
   } else {
     return ExceptionsHelper.status(cause);
   }
 }