It would be good if we could send a substitute message here.  
A smaller one that says "your buffer is too small, its needs to be at least X".

Then the client could display that to the caller.