}
private ExecutionErrorResource createNewExecutionErrorResource(
String experimentId, ExecutionError errorSource, ExecutionErrors.Source type) throws RegistryException {
if (!isExperimentExists(experimentId)){
throw new ExperimentDoesNotExistsException(experimentId);
}
ExecutionErrorResource executionError = jpa.getWorker().getExperiment(experimentId).getData().createExecutionError();
setupValues(errorSource, executionError);
executionError.setSourceType(type.toString());
return executionError;