File tree 1 file changed +2
-1
lines changed
1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ const util = require('util');
30
30
const inherits = util . inherits ;
31
31
const debug = util . debuglog ( 'https' ) ;
32
32
const { urlToOptions, searchParamsSymbol } = require ( 'internal/url' ) ;
33
+ const errors = require ( 'internal/errors' ) ;
33
34
34
35
function Server ( opts , requestListener ) {
35
36
if ( ! ( this instanceof Server ) ) return new Server ( opts , requestListener ) ;
@@ -226,7 +227,7 @@ exports.request = function request(options, cb) {
226
227
if ( typeof options === 'string' ) {
227
228
options = url . parse ( options ) ;
228
229
if ( ! options . hostname ) {
229
- throw new Error ( 'Unable to determine the domain name ' ) ;
230
+ throw new errors . Error ( 'ERR_INVALID_DOMAIN_NAME ' ) ;
230
231
}
231
232
} else if ( options && options [ searchParamsSymbol ] &&
232
233
options [ searchParamsSymbol ] [ searchParamsSymbol ] ) {
You can’t perform that action at this time.
0 commit comments