We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
error
complete
I found that tap only supports next event of the streams.
tap
next
How do I introduce side-effects on error/complete events?
The text was updated successfully, but these errors were encountered:
Hi @xareelee. Error and end can be observed (and thus perform side-effects) via the promise returned by observe, drain, or reduce.
import { throwError, empty } from 'most' const s1 = throwError(new Error('error stream')) s1.drain() .catch(e => console.error('errored', e.stack)) const s2 = empty() s1.drain() .then(() => console.log('ended'))
You can also use continueWith and recoverWith to replace the end and error signals with more events.
Sorry, something went wrong.
@briancavalier
It seems that I can't introduce side-effects for error/complete like tap per subscription. doesn't it?
If you can tap your stream stream, you can continueWith/recoverWith just before subscribing to it.
continueWith
recoverWith
No branches or pull requests
I found that
tap
only supportsnext
event of the streams.How do I introduce side-effects on
error
/complete
events?The text was updated successfully, but these errors were encountered: