UNPKG

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.

22 lines (17 loc) 434 B
const ApiException = require("../exceptions/apiException"); module.exports = (production) => { function interceptor(err, req, res, next) { if (!production) { console.log(err); } if (err instanceof ApiException) { res.status(err.statusCode).json(err.message); return; } res.status(500).json("An internal error has occurred"); next(); } return { interceptor: interceptor, }; };