docs: function streamToText(stream) {
      return new Promise((fulfill, reject) => {
          let chunks = [];
          let length = 0;
          stream.setEncoding('utf8');
          stream.on('data', chunk => {
              length += chunk.length;
              if (length > MAX_TEXT_LENGTH) {
                  reject(new Error('Response is too big'));
                  return;
              }
              chunks.push(chunk);
          });
          stream.on('end', () => {
              fulfill(chunks.join(''));
          });
          stream.on('error', err => {
              reject(err);
          });
      });
  }