better error message - BUFFER_SHORTAGE
I recently ran into "BUFFER_SHORTAGE" errors due to what ended up being an encoding problem on my end. My suggestion is that "BUFFER_SHORTAGE" is perhaps not a correctly descriptive error message. I would recommend something like "BUFFER_TOO_SHORT" instead, since "BUFFER_SHORTAGE" make it sound like something is having trouble allocating a buffer, due to memory constraints, or something. You don't have a shortage of buffers in this case - you have a buffer that is too short.
Originally posted by @jvsteiner in https://github.com/kawanet/msgpack-lite/issues/60#issuecomment-703238575
I'm having the same error, not knowing what I did wrong. Can you provide some information on what "encoding problem" you encountered?
It's been a while, but iirc, I was encoding the object somewhere, and that wasn't working right, resulting in a zero length buffer, which caused the error when I tried to decode it.