utils/app.error.js
function (opts) {
        this.isAppError = true;
        this.code = opts.code;
        this.message = this.msg = opts.msg;
        this.type = opts.type;
        this.err = opts.err;
        this.stack = (new Error(opts.msg)).stack;
    }
function (opts) {
        this.isAppError = true;
        this.code = opts.code;
        this.message = this.msg = opts.msg;
        this.type = opts.type;
        this.err = opts.err;
        this.stack = (new Error(opts.msg)).stack;
    }
function ( opts ) { this . isAppError = true ; this . code = opts . code ; this . message = this . msg = opts . msg ; this . type = opts . type ; this . err = opts . err ; this . stack = ( new Error ( opts . msg ) ) . stack ; }
Constructor recieves a object with options that are used
to define values on the error. These values are used at the
middleware layer to translate into friendly messages

@param opts
@constructor
Constructor recieves a object with options that are used to define values on the error . These values are used at the middleware layer to translate into friendly messages