Skip to content

Commit

Permalink
fix: pr comments
Browse files Browse the repository at this point in the history
  • Loading branch information
DonutEspresso committed Feb 20, 2018
1 parent 061dc60 commit 0d1fe86
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 0 additions & 2 deletions lib/HttpClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@

// core modules
var EventEmitter = require('events').EventEmitter;
var fs = require('fs');
var http = require('http');
var https = require('https');
var net = require('net');
var os = require('os');
var path = require('path');
var querystring = require('querystring');
var url = require('url');
var util = require('util');
Expand Down
4 changes: 4 additions & 0 deletions lib/helpers/errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,10 @@ function createTooManyRedirectsErr(opts, req) {
* @private
* @function fullRequestUrl
* @param {Object} opts request options
* @param {String} opts.path the requested path as set by the user
* @param {String} opts.protocol http/https
* @param {String} opts.host hostname of the request
* @param {String} opts.port port number of the request
* @returns {String}
*/
function fullRequestUrl(opts) {
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@
"restify-errors": "git+https://git@github.com/restify/errors#verror-base",
"semver": "^5.0.1",
"tunnel-agent": "^0.6.0",
"uuid": "^3.0.1",
"verror": "^1.9.0"
"uuid": "^3.0.1"
},
"optionalDependency": {
"dtrace-provider": "^0.8.3"
Expand Down
9 changes: 4 additions & 5 deletions test/errors.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ var dns = require('dns');
var assert = require('chai').assert;
var bunyan = require('bunyan');
var restify = require('restify');
var verror = require('verror');

var clients = require('../lib');

Expand Down Expand Up @@ -47,7 +46,7 @@ describe('Error factories', function () {
}, function (err, req) {
assert.ok(err);
assert.strictEqual(err.name, 'ConnectTimeoutError');
assert.deepEqual(verror.info(err), {
assert.deepEqual(err.info(), {
address: '10.255.255.1',
connectTimeout: 200,
fullUrl: 'http://10.255.255.1:81/foo?a=1',
Expand Down Expand Up @@ -79,7 +78,7 @@ describe('Error factories', function () {
}, function (err, req) {
assert.ok(err);
assert.strictEqual(err.name, 'DNSTimeoutError');
assert.deepEqual(verror.info(err), {
assert.deepEqual(err.info(), {
address: null,
connectTimeout: 200,
fullUrl: 'http://www.restify.com/foo?a=1',
Expand Down Expand Up @@ -118,7 +117,7 @@ describe('Error factories', function () {
'http://127.0.0.1:' + PORT + '/timeout ' +
'failed to complete within 150ms'
);
assert.deepEqual(verror.info(err), {
assert.deepEqual(err.info(), {
address: '127.0.0.1',
fullUrl: 'http://127.0.0.1:' + PORT + '/timeout',
method: 'GET',
Expand All @@ -142,7 +141,7 @@ describe('Error factories', function () {
CLIENT.get('/500', function (err, req, res, obj) {
assert.isTrue(err instanceof Error);
assert.strictEqual(err.name, 'InternalServerError');
assert.deepEqual(verror.info(err), {
assert.deepEqual(err.info(), {
address: '127.0.0.1',
fullUrl: 'http://127.0.0.1:' + PORT + '/500',
method: 'GET',
Expand Down

0 comments on commit 0d1fe86

Please sign in to comment.