jur9526 / couchdb-python

Automatically exported from code.google.com/p/couchdb-python
Other
0 stars 0 forks source link

CouchDB errors are not reported cleanly (shows up as exception from simplejson) #233

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Provoke a CouchDB timeout error: 
https://gist.github.com/wickedgrey/d2c87e6ee1e7c695abae (Note: I have no idea 
how to do this consistently; see 
https://issues.apache.org/jira/browse/COUCHDB-2218 ).
2. Try to be reading a view when provoking the error: 
https://gist.github.com/geordanr/30458322a74d3c753ab9

I don't have the actual HTTP request / response data.

I would like to have the exception convey more information about what exactly 
went wrong (ie. what the HTTP status code was, the raw bytes received, etc.) 
rather than getting something coming from inside simplejson.

Original issue reported on code.google.com by wickedg...@gmail.com on 1 Apr 2014 at 6:40

GoogleCodeExporter commented 9 years ago
I guess we could start by wrapping the decode in a try-catch and raising 
another exception with better data (e.g. HTTP headers and the data flowing into 
the decode)?

Original comment by djc.ochtman on 1 Apr 2014 at 7:38

GoogleCodeExporter commented 9 years ago
This issue has been migrated to GitHub. Please continue discussion here:

https://github.com/djc/couchdb-python/issues/233

Original comment by djc.ochtman on 15 Jul 2014 at 7:23