File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ const util = require('util');
3030const inherits = util . inherits ;
3131const debug = util . debuglog ( 'https' ) ;
3232const { urlToOptions, searchParamsSymbol } = require ( 'internal/url' ) ;
33+ const errors = require ( 'internal/errors' ) ;
3334
3435function Server ( opts , requestListener ) {
3536 if ( ! ( this instanceof Server ) ) return new Server ( opts , requestListener ) ;
@@ -226,7 +227,7 @@ exports.request = function request(options, cb) {
226227 if ( typeof options === 'string' ) {
227228 options = url . parse ( options ) ;
228229 if ( ! options . hostname ) {
229- throw new Error ( 'Unable to determine the domain name ' ) ;
230+ throw new errors . Error ( 'ERR_INVALID_DOMAIN_NAME ' ) ;
230231 }
231232 } else if ( options && options [ searchParamsSymbol ] &&
232233 options [ searchParamsSymbol ] [ searchParamsSymbol ] ) {
You can’t perform that action at this time.
0 commit comments