Capturing Errors #31

JSnoob opened this Issue Apr 11, 2013 · 5 comments


None yet
3 participants

JSnoob commented Apr 11, 2013

If a search entry produces an error in Solr: ie

< lst name="error" >
  < str name="msg" > org.apache.solr.earch.SyntaxError: undefined field / > < str />
  < int name="code" > 400  < / >
< /lst >

How can we get modify ajax-solr to have this error message returned? Currently, there is no data in the Manager.response object when an error occurs.

@jpmckinney jpmckinney added a commit that referenced this issue Apr 11, 2013

@jpmckinney jpmckinney add errorHandler, closes #31 3716f4e

jpmckinney commented Apr 11, 2013

I've added a handleError method on the manager, which is now called by the jQuery manager on failure.

I have question. The "message" passed to the handleError method seems to be the ajax call error mesage (which is often the unhelpful "error"). Is there away to get to the actual error message of the Solr Response?


jpmckinney commented May 17, 2016

I usually have my browser's network inspector open so that I can see what request was sent to Solr. I then copy that request and send it myself to see the original error message.

Thanks for the response. Thanks actually exactly what I ended up doing. I'm guessing the responseHeaders are blank because of something to do with same-origin policy? Great work on this plugin by the way, I've been loving it.


jpmckinney commented May 17, 2016

I'm not exactly sure - a few things can cause the error message to be less helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment