-
-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle streams attached to an error by replacing them with '[object Stream]'
#57
Conversation
If the module is going to handle readables, then what about writables and transform streams? |
Also, this can be used: https://github.com/sindresorhus/is-stream |
would make sense - what do you think about adding this as a dependency? |
This needs a test. |
Nah. I think what you have is fine for now. https://github.com/sindresorhus/serialize-error/pull/57/files#diff-e727e4bdf3657fd1d798edcd6b099d6e092f8573cba266154583a746bba0f346R80 |
This also needs to support https://nodejs.org/api/webstreams.html#class-readablestream (web streams) |
Same applies here: #55 (comment) I didn't realize that |
update: working on the tests |
It's just to make the common use-case nicer. It's not meant for two-way transfer. It's mostly just to make it nicer for logging and storing errors. |
@sindresorhus would you think it makes more sense to split it up to show a text depending on the stream type? Something along the lines of this:
|
No, let's keep it simple. |
ok, then I think it's done |
'[object Stream]'
fixes #56