npm install --save business-error
const {BusinessCase, BusinessError} = require('business-error');
const businessCase = new BusinessCase('code', 'Any business validation message');
throw new BusinessError('a business error', businessCase);
The node-business-error
project is under MIT license.