Commits

Bryan Fink  committed 04522c9

error handlers return {Content, Reqstate}, not just Content

  • Participants
  • Parent commits c25ec2d

Comments (0)

Files changed (1)

File src/webmachine_decision_core.erl

 
 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) ->