summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/catlfish_web.erl4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/catlfish_web.erl b/src/catlfish_web.erl
index 2ddd7ed..52441fc 100644
--- a/src/catlfish_web.erl
+++ b/src/catlfish_web.erl
@@ -91,6 +91,10 @@ loop(Req, Module) ->
Req:respond({501, [], []})
end
catch
+ exit:{body_too_large, What} ->
+ lager:info("HTTP POST body too large: ~p", [What]),
+ Req:respond({413, [{"Content-Type", "text/plain"}],
+ "Request Entity Too Large\n"});
Type:What ->
[CrashFunction | Stack] = erlang:get_stacktrace(),
lager:error("Crash in ~p for path ~p: ~p ~p~n~p~n~p~n",