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

    var errInfo = createErrInfo(opts, req);
    var errMsg = [
        opts.method,
        'request to',
        errInfo.fullUrl,
        'failed to complete within',
        opts.requestTimeout + 'ms'
    ].join(' ');

    return new ERR_CTOR.RequestTimeoutError({
        info: _.assign(errInfo, {
            requestTimeout: opts.requestTimeout
        })
    }, '%s', errMsg);
}
function createRequestTimeoutErr(opts, req) {
    assert.object(opts, 'opts');
    assert.object(req, 'req');

    var errInfo = createErrInfo(opts, req);
    var errMsg = [
        opts.method,
        'request to',
        errInfo.fullUrl,
        'failed to complete within',
        opts.requestTimeout + 'ms'
    ].join(' ');

    return new ERR_CTOR.RequestTimeoutError({
        info: _.assign(errInfo, {
            requestTimeout: opts.requestTimeout
        })
    }, '%s', errMsg);
}
function createRequestTimeoutErr ( opts , req ) { assert . object ( opts , 'opts' ) ; assert . object ( req , 'req' ) ; var errInfo = createErrInfo ( opts , req ) ; var errMsg = [ opts . method , 'request to' , errInfo . fullUrl , 'failed to complete within' , opts . requestTimeout + 'ms' ] . join ( ' ' ) ; return new ERR_CTOR . RequestTimeoutError ( { info : _ . assign ( errInfo , { requestTimeout : opts . requestTimeout } ) } , '%s' , errMsg ) ; }
build a request timeout error for a request that failed to complete within
the specified timeout period.
@private
@function createRequestTimeoutErr
@param {Object} opts options object for a request
@param {Object} req the request object
@returns {verror.VError} RequestTimeoutError
build a request timeout error for a request that failed to complete within the specified timeout period .