code: protected Response handleAPIException(APIException ex, Method method, Object[] params) throws Exception {
          return buildResponse(Response.status(ex.getHttpStatus()));
      }
docs: Called by interceptor in case of API invocation exception.
  <p/>
  Default implementation simply returns {@link Response} with HTTP code taken from ex param.
  
  @param ex     Caught exception instance.
  @param method Invoked method.
  @param params Invoked method params.
  @return Method must return {@link Response} on behalf of invoked API method.
  @throws Exception