riakデータベースで顧客を更新しようとしていますが、次のエラーメッセージが表示されます: このエラーの原因とそのエラーメッセージ。は、顧客がエルランに置かれた場合に更新することはできません
そして、私が使用してモジュールがある:
allowed_methods(Request, State) ->
{['PUT'], Request, State}.
content_types_accepted(Request, State) ->
{[{"application/json",to_json}], Request, State}.
エラー
webmachine error: path="/customer/cus/update" {error, {error,undef, [{customer_update,to_json, [{wm_reqdata,'PUT',http, {1,1}, "127.0.0.1", {wm_reqstate,#Port<0.6513>, {dict,4,16,16,8,80,48, {[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]}, {{[],[],[], [[mediaparams,{"charset","UTF-8"}]], [], [[resource_module|customer_update], ['content-type',116,101,120,116,47,104,116,109, 108]], [], [['content-encoding',105,100,101,110,116,105,116, 121]], [],[],[],[],[],[],[],[]}}}, undefined,"127.0.0.1",'REQDATA',undefined,undefined, {wm_log_data,undefined, {1322,989559,450145}, 'PUT', {6, {"content-length", {'Content-Length',"121"}, {"connection",{'Connection',"Keep-Alive"},nil,nil}, {"content-type", {'Content-Type', "application/json; charset=UTF-8"}, nil, {"host", {'Host',"localhost:8000"}, {"expect",{"Expect","100-Continue"},nil,nil}, {"user-agent", {'User-Agent', "Apache-HttpClient/4.0.1 (java 1.5)"}, nil,nil}}}}}, "127.0.0.1","/updatecustomer", {1,1}, 404,0,undefined,undefined,undefined}}, [],"/customer/cus/update","//customer/cus/update", {dict,0,16,16,8,80,48, {[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]}, {{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]}}}, [],".",500,1073741824,67108864,[],[], {6, {"content-length", {'Content-Length',"121"}, {"connection",{'Connection',"Keep-Alive"},nil,nil}, {"content-type", {'Content-Type',"application/json; charset=UTF-8"}, nil, {"host", {'Host',"localhost:8000"}, {"expect",{"Expect","100-Continue"},nil,nil}, {"user-agent", {'User-Agent',"Apache-HttpClient/4.0.1 (java 1.5)"}, nil,nil}}}}}, not_fetched_yet,false, {1,{"content-type",{"Content-Type","text/html"},nil,nil}}, <<>>, ["localhost"], 8000,[]}, undefined]}, {webmachine_resource,resource_call,3}, {webmachine_resource,do,3}, {webmachine_decision_core,resource_call,1}, {webmachine_decision_core,accept_helper,0}, {webmachine_decision_core,decision,1}, {webmachine_decision_core,handle_request,2}, {webmachine_mochiweb,loop,1}]}}
別のモジュールでto_jsonを定義しています。 – user1067665
+1。ウェブマシンに関するいくつかのドキュメントを読んでください、それはさらに助けになると思います – danechkin