flowviz
Version:
A framework which provides seamless integration with other phylogenetic tools and frameworks, while allowing workflow scheduling and execution, through the Apache Airflow workflow system.
16 lines (11 loc) • 327 B
JavaScript
const ApiException = require("../exceptions/apiException");
async function getOne(fetchFn, id, entityDesignation) {
const entity = await fetchFn(id);
if (!entity) {
throw ApiException.notFound(
`The ${entityDesignation} with value ${id} does not exist.`
);
}
return entity;
}
module.exports = getOne;