Export to GitHub

couchdb-python - issue #233

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


Posted on Apr 1, 2014 by Helpful Hippo

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.

Comment #1

Posted on Apr 1, 2014 by Quick Rhino

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)?

Comment #2

Posted on Jul 15, 2014 by Quick Rhino

This issue has been migrated to GitHub. Please continue discussion here:

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

Status: New

Labels:
Type-Defect Priority-Medium