solr-node-client icon indicating copy to clipboard operation
solr-node-client copied to clipboard

error information return

Open jiangyan33 opened this issue 5 years ago • 1 comments

source code

function SolrError(req,res,htmlMessage){
   var message = '';
   if(htmlMessage){
      var matches = htmlMessage.match(/<pre>([\s\S]+)<\/pre>/);
      message = decode((matches || ['', htmlMessage])[1].trim());
   }
   HTTPError.call(this, req, res, message);
   Error.captureStackTrace(this,arguments.callee);
   this.statusCode = res.statusCode;
   this.message = res.statusMessage;
   this.name = 'SolrError';
}

error information is in htmlMessage, res.statusMessage just is "bad request"

jiangyan33 avatar Apr 28 '19 09:04 jiangyan33

Looks like this PR covers this: https://github.com/lbdremy/solr-node-client/pull/210

melloware avatar Oct 18 '21 18:10 melloware