Added var_dumps and dies in side couchdb errors. they appera as alert boxes on the client side.