Having just updated to 1.1.0, I think I've been caught by the one
breaking change listed;
* Document id's are now validated during PUT. This means that some PUT
requests will fail that previously succeeded.
The user object I'm trying to store is:
|{
||"|_id|": |"org.couchdb.user:test_appdata_user"||
|"|salt|": |"91ae270048fae61ebcff7730e5014150a529d082"|,
"|password_sha|": |"968091cd9ce21a0fca52232b85f9971c925801bd"|,
"|name|": |"test_appdata_user"|,
"|type|": |"user"|,
"|roles|": |[
|"cgm_view"|,
|"cgm_store_appdata"|
]|,
}
|and it fails equally in Futon or my own code.
||
In Futon the dialog is:
|Error: unknown_error|
|function_clause|
||
||The breaking changes info wasn't helpful as to what was happening, or
why...
What is happening here?
-Patrick
Logs are:
[Wed, 08 Jun 2011 02:27:48 GMT] [debug] [<0.761.0>] 'PUT'
/_users/org.couchdb.user%3Atest_appdata_user {1,1} from "127.0.0.1"
Headers: [{'Accept',"application/json,text/html,text/plain,*/*"},
{'Authorization',"Basic YWRtaW46bWluaW9u"},
{'Content-Length',"234"},
{'Content-Type',"application/json"},
{'Host',"localhost:5984"}]
[Wed, 08 Jun 2011 02:27:48 GMT] [debug] [<0.761.0>] OAuth Params: []
[Wed, 08 Jun 2011 02:27:48 GMT] [error] [<0.761.0>] function_clause
error in HTTP request
[Wed, 08 Jun 2011 02:27:48 GMT] [info] [<0.761.0>] Stacktrace:
[{mochiweb_request,get,
[scheme,
{mochiweb_request,#Port<0.2316>,'PUT',
"/_users/org.couchdb.user%3Atest_appdata_user",
{1,1},
{5,
{"authorization",
{'Authorization',
"Basic YWRtaW46bWluaW9u"},
{"accept",
{'Accept',
"application/json,text/html,text/plain,*/*"},
nil,nil},
{"host",
{'Host',"localhost:5984"},
{"content-type",
{'Content-Type',"application/json"},
{"content-length",
{'Content-Length',"234"},
nil,nil},
nil},
nil}}}}]},
{couch_httpd,absolute_uri,2},
{couch_httpd_db,db_doc_req,3},
{couch_httpd_db,do_db_req,2},
{couch_httpd,handle_request_int,5},
{mochiweb_http,headers,5},
{proc_lib,init_p_do_apply,3}]
[Wed, 08 Jun 2011 02:27:48 GMT] [info] [<0.761.0>] 127.0.0.1 - - 'PUT'
/_users/org.couchdb.user%3Atest_appdata_user 500
[Wed, 08 Jun 2011 02:27:48 GMT] [debug] [<0.761.0>] httpd 500 error
response:
{"error":"unknown_error","reason":"function_clause"}