lib/helpers/errors.js
function createHttpErr(statusCode, opts, req) {
    assert.number(statusCode, 'statusCode');
    assert.object(opts, 'opts');
    assert.object(req, 'req');

    var errInfo = createErrInfo(opts, req);

    return restifyErrors.makeErrFromCode(statusCode, {
        info: errInfo
    });
}
function createHttpErr(statusCode, opts, req) {
    assert.number(statusCode, 'statusCode');
    assert.object(opts, 'opts');
    assert.object(req, 'req');

    var errInfo = createErrInfo(opts, req);

    return restifyErrors.makeErrFromCode(statusCode, {
        info: errInfo
    });
}
function createHttpErr ( statusCode , opts , req ) { assert . number ( statusCode , 'statusCode' ) ; assert . object ( opts , 'opts' ) ; assert . object ( req , 'req' ) ; var errInfo = createErrInfo ( opts , req ) ; return restifyErrors . makeErrFromCode ( statusCode , { info : errInfo } ) ; }
build an http error for a request that has a corresponding http status code
on the response.
@private
@function createHttpErr
@param {Object} statusCode response status code
@param {Object} opts options object for a request
@param {Object} req the request object
@returns {verror.VError}
build an http error for a request that has a corresponding http status code on the response .