code: private static Response createErrorResponse(Exception e, AlluxioConfiguration alluxioConf) {
      AlluxioStatusException se = AlluxioStatusException.fromThrowable(e);
      ErrorResponse response = new ErrorResponse(se.getStatus().getCode(), se.getMessage());
  
      Response.ResponseBuilder rb = Response.serverError().entity(response);
      if (alluxioConf.getBoolean(PropertyKey.WEBUI_CORS_ENABLED)) {
        return makeCORS(rb).build();
      }
  
      return rb.build();
    }
docs: Creates an error response using the given exception.
  
  @param e the exception to be converted into {@link ErrorResponse} and encoded into json
  @return the response