import org.oransc.enrichment.exceptions.ServiceException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import org.springframework.http.HttpStatus;
import org.springframework.util.FileSystemUtils;
/**
public synchronized InfoType getType(String id) throws ServiceException {
InfoType type = allEiTypes.get(id);
if (type == null) {
- throw new ServiceException("Information type not found: " + id);
+ throw new ServiceException("Information type not found: " + id, HttpStatus.NOT_FOUND);
}
return type;
}
out.print(gson.toJson(type));
}
} catch (Exception e) {
- logger.warn("Could not save job: {} {}", type.getId(), e.getMessage());
+ logger.warn("Could not save type: {} {}", type.getId(), e.getMessage());
}
}