better error handling in case of buffer is JSON. Show message instead of Object[Object], because buffer is often looks like:
{
   phase: 0
   error: "[{<<"lineno">>,466},{<<"message">>,<<"SyntaxError: syntax error">>},{<<"source">... (length: 92)"
   input: "{ok,{r_object,<<"users">>,<<"b1f0e0b64f8143a6a45977db8e29ff89">>,[{r_content,{di... (length: 515)"
}