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

Propagate onError #52

Open
rogeriochaves opened this issue May 11, 2020 · 1 comment
Open

Propagate onError #52

rogeriochaves opened this issue May 11, 2020 · 1 comment

Comments

@rogeriochaves
Copy link

I noticed that secret-stack initiates a multiserver server but passes null as the onError parameter:

server = ms.server(setupRPC, null, function () {

as a result sometimes I have this error logged on my app, and there is nothing I can do about it:

Error replicating with @d64Q93XzBhbr2JCLWkZgvzKwTHMvwFgRdtw4fHFlF5k=.ed25519:
   Error: stream ended with:122 but wanted:156
    at drain (/app/node_modules/pull-reader/index.js:43:26)
    at /app/node_modules/pull-reader/index.js:63:18
    at /app/node_modules/pull-reader/index.js:114:13
    at drain (/app/node_modules/stream-to-pull-stream/index.js:126:18)
    at Socket.<anonymous> (/app/node_modules/stream-to-pull-stream/index.js:143:5)
    at Socket.emit (events.js:198:15)
    at Socket.EventEmitter.emit (domain.js:481:20)
    at endReadableNT (_stream_readable.js:1139:12)
    at processTicksAndRejections (internal/process/task_queues.js:81:17)

should we add an onError callback or is there a better way to capture those that I'm not aware of?

@arj03
Copy link
Member

arj03 commented May 26, 2020

I think that error should be pretty harmless. As for the error handling part, I'm not sure what the best way would be to add it, given how the function is used in the file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants