Schema validator for error objects. Built with miller.
$ npm i --save miller-error
Validate an object. Either throws a TypeError or returns the same object.
var errSchema = require('miller-error');
errSchema({
error: new Error('login error'),
message: 'Whoops, something went wrong with the login',
statusCode: 1
});