I prefer returning everything that was received. It should be the caller's responsibility to sanitize it and parse out what makes sense, for example everything up until the last newline.

The `:max => 1000` contract is simply that an exception will be raised if you exceed that limit. You should be able to view what was returned to figure out why the limit got tripped (maybe there's one extra newline at the end).