What steps will reproduce the problem?
1.I could create a document in couchdb. Now the issue is that with jcouchdb
when i try to insert a wrong doc, I get an exception back
sekhri@xps:~/Work/RegSrv/Client/java$ java test
org.jcouchdb.db.Response@4a6cbf: code = 403, stream = null
org.jcouchdb.exception.DataAccessException: error creating document
{"typea":"test","alias":"test","admin":"test","foo":"value for the foo
attribute","bar":"value for the bar attribute","url":"test"}in database
'registrationservice': code 403
at org.jcouchdb.db.Database.createOrUpdateDocument(Database.java:479)
at org.jcouchdb.db.Database.createDocument(Database.java:266)
2. I tried to retrive the error messag but it seems it gets lost somewhere.
The good thing is I still get an exception with code 403. The bad thing is
that i can't retrieve the proper message back "The 'type' field is required."
3.I tested it with the python client and it seems to work fine. The good
thing is that if I don't specify a certain field , I get back proper
message now.
sekhri@xps:~/Work/RegSrv/Client$ python testreg.py
Create a document, using an assigned docId:
{
"error": "forbidden",
"reason": "The 'alias' field is required."
}
What is the expected output? What do you see instead?
"reason": "The 'alias' field is required."
org.jcouchdb.db.Response@4a6cbf: code = 403, stream = null
What version of the product are you using? On what operating system?
http://jcouchdb.googlecode.com/files/jcouchdb-0.9.0-2.jar
Please provide any additional information below.
Original issue reported on code.google.com by sekhrivi...@gmail.com on 20 Jul 2009 at 6:31
Original issue reported on code.google.com by
sekhrivi...@gmail.com
on 20 Jul 2009 at 6:31