Hotfix/0.1.2 Fix a bad cowboy crash

The response body size calculation was wrong. A crash in the hook is bad, we end up returning 502 responses.