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.
add errorHandler, closes #31
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?
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.
I'm not exactly sure - a few things can cause the error message to be less helpful.