JerryChen716 / solrpy

Automatically exported from code.google.com/p/solrpy
0 stars 0 forks source link

solr errors don't appear in exceptions #17

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Add a document with a field that's not in the solr schema. Solr writes back
with something like "HTTP Status 400 - ERROR:unknown field 'username'", but
the python exception looks like this:

Traceback (most recent call last):
  File "demo", line 27, in <module>
    solr.add(**dict((str(k), unicode(v)) for k,v in row.items()))
  File "solr/core.py", line 585, in add
  File "solr/core.py", line 667, in _update
  File "solr/core.py", line 732, in _post
  File "solr/core.py", line 975, in check_response_status
<class 'solr.core.SolrException'>: HTTP code=400, reason=Bad Request

It would be helpful to see the "unknown field 'username'" message right in
the exception text. A workaround is to tail the solr log in another window.

solrpy 0.9, solr 1.4.0, python 2.5.1

Original issue reported on code.google.com by drewpca on 28 Jan 2010 at 10:50