Skip to content
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

Add a way to identify reject handlers for use by Transponders to reject Promises #22

Closed
eudaimos opened this issue Jun 28, 2020 · 1 comment
Labels
devxp development experience pkg: koa corresponds to the @tao.js/koa package pkg: utils corresponds to the @tao.js/utils package

Comments

@eudaimos
Copy link
Contributor

It would be useful if when using a Transponder to generate a Promise from a setCtx or setAppCtx call, a set of filtered trigrams could be used to identify when the promise should be rejected.

This is useful for clients working with the network that are still promise-based implementations and wish to use promise rejection as a status that things went wrong and act accordingly.

@eudaimos eudaimos added devxp development experience pkg: utils corresponds to the @tao.js/utils package pkg: koa corresponds to the @tao.js/koa package labels Jun 28, 2020
@eudaimos
Copy link
Contributor Author

Possible implementation might be the Transponder adding handlers to the wrapped Network and then use the reject function if those are called.

Would this require decorating a handler with metadata that can be used in-stream like how the control works to allow the network to manage messages?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devxp development experience pkg: koa corresponds to the @tao.js/koa package pkg: utils corresponds to the @tao.js/utils package
Projects
None yet
Development

No branches or pull requests

1 participant