sindresorhus / get-stream

Get a stream as a string, Buffer, ArrayBuffer or array
MIT License
341 stars 33 forks source link

Truncate `error.bufferedData` if too large #68

Closed ehmicky closed 1 year ago

ehmicky commented 1 year ago

When error.bufferedData is too large, it is not set instead. With this PR, error.bufferedData is still set, but with a smaller string/buffer. If the stream is too large, having the first bytes of it can prove to be very useful for debugging.

sindresorhus commented 1 year ago

Conflict

ehmicky commented 1 year ago

Fixed :+1: