Closed palamccc closed 6 months ago
Hey @palamccc thanks for the contribution!
Would you be able to add tests for your changes? Looks like RSocketServer-test.js
might have good examples to build off of.
Additionally the DCO check will ideally need to be resolved before this can be merged.
Would you be able to add tests for your changes? Looks like
RSocketServer-test.js
might have good examples to build off of.
@viglucci I've added tests now.
LGTM. Thanks! I'll LYK when a new version is published.
I've contributed types to DefinitelyTyped https://github.com/DefinitelyTyped/DefinitelyTyped/pull/68788 Waiting for 0.0.28 release :-).
@palamccc I've published a new version which should include this change. If you would be so kind, please validate this change with rsocket-core@0.0.29-alpha.0
.
Motivation:
In the rsocket-js implementation (v0 branch), all stream errors are serialized and transmitted to other end with fixed error code. Due to this bug, there is no way to send custom error codes over stream (Bug report https://github.com/rsocket/rsocket-js/issues/218)
Custom error codes are supported in the rsocket protocol and implemented in rsocket-java this using RSocketErrorException . When the application throws
RSocketErrorExecption
, the error code of the exception is sent over the stream. But this feature is not implemented in rsocket-js.Modifications:
RSocketError
inRSocketError.js
.RSocketError
, theerrorCode
of the error object is sent over the stream.Result:
This will allow application to send custom error codes to other party.