static void throwRestServiceExceptionIfEnabled(RestServiceException restServiceException, boolean isEnabled)
      throws RestServiceException {
    if (isEnabled) {
      throw restServiceException;
    }
  }
Throws the specified {@link RestServiceException} if isEnabled is {@code true}. No-op otherwise.
@param restServiceException {@link RestServiceException} object to throw.
@param isEnabled if {@code true} then throw the specified exception. do nothing otherwise.
@throws RestServiceException the exception to throw.
ambry-frontend/src/main/java/com/github/ambry/frontend/FrontendUtils.java