code: protected HyperionException readException(Response response) throws IOException
      {
          ErrorResponse errorResponse = null;
          try
          {
              errorResponse = objectMapper.readValue(response.body().byteStream(), ErrorResponse.class);
          }
          catch (Exception ignore)
          {
          }
  
          HyperionException resolvedException = null;
          if (errorResponse != null)
          {
              try
              {
                  Class exceptionClass = Class.forName(errorResponse.getType());
                  resolvedException = (HyperionException) exceptionClass.getConstructor(String.class)
                          .newInstance(errorResponse.getMessage());
              }
              catch (Throwable ignore)
              {
              }
  
              if (resolvedException == null)
              {
                  resolvedException =
                          new HyperionException(errorResponse.getStatusCode(), errorResponse.getMessage());
              }
  
              resolvedException.setErrorDetails(errorResponse.getErrorDetails());
              resolvedException.setErrorTime(errorResponse.getErrorTime());
              resolvedException.setRequestId(errorResponse.getRequestId());
          }
  
          if (resolvedException == null)
          {
              resolvedException =
                      new HyperionException(response.code(), response.message());
          }
  
          return resolvedException;
  
      }
docs: Create the proper exception for the error response
  @param response The http response
  @return The exception for the error response
  @throws IOException