code: function error(ErrorCtor, message, prefix, statusCode) {
    const err = new ErrorCtor(
      prefix ? `Invalid WebSocket frame: ${message}` : message
    );
  
    Error.captureStackTrace(err, error);
    err[kStatusCode] = statusCode;
    return err;
  }
docs: Builds an error object.
  
  @param {(Error|RangeError)} ErrorCtor The error constructor
  @param {String} message The error message
  @param {Boolean} prefix Specifies whether or not to add a default prefix to
  `message`
  @param {Number} statusCode The status code
  @return {(Error|RangeError)} The error
  @private