1. Justin Sheehy
  2. riak

Commits

Bryan Fink  committed 3fa7a28

copy webmachine changeset 04522c955979, for better error rendering

  • Participants
  • Parent commits fcd3d87
  • Branches default

Comments (0)

Files changed (1)

File deps/webmachine/src/webmachine_decision_core.erl

View file
 
 error_response(Code, Reason) ->
     {ok, ErrorHandler} = application:get_env(webmachine, error_handler),
-    ErrorHTML = ErrorHandler:render_error(
-                  Code, {webmachine_request,get(reqstate)}, Reason),
+    {ErrorHTML, ReqState} = ErrorHandler:render_error(
+                              Code, {webmachine_request,get(reqstate)}, Reason),
+    put(reqstate, ReqState),
     wrcall({set_resp_body, ErrorHTML}),
     respond(Code).
 error_response(Reason) ->