I think silently truncating messages is maybe not the best way. Why wouldn't the library raise an exception here?