Skip to content

Propagate onError #52

@rogeriochaves

Description

@rogeriochaves

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions