Skip to content

Conversation

@stevegury
Copy link
Member

_Problem_
Errors generated from the Responder are serialized according to the spec
https://github.com/ReactiveSocket/reactivesocket/blob/master/Protocol.md#error-codes
but the type is lost when deserialized by the Requester.

_Solution_
Instead of generating a RuntimeException containing the string of the error,
generate the right Exception type based on the error code.
This allows user code or filter to make smart decision based on the Exception
type (Retryable, ...)

***Problem***
Errors generated from the `Responder` are serialized according to the spec
https://github.com/ReactiveSocket/reactivesocket/blob/master/Protocol.md#error-codes
but the type is lost when deserializing by the `Requester`.

***Solution***
Instead of generating a RuntimeException containing the string of the error,
generate the right Exception type based on the error code.
This allow user code, or filter to make smart decision based on the Exception
type (Retryable, ...)
stevegury added a commit that referenced this pull request Jul 15, 2016
***Problem***
There is an error in the Error frame, the error codes used for `APPLICATION_ERROR`,
`REJECTED`, `CANCELED` and `INVALID` were invalid.

***Solution***
Update the constants.
I don't think it requires doing any version bump, since the error code was not used
prior to #150.

***Modification***
I also took the oportunity to review the `frame` package and update it to the Java
code style.
robertroeser pushed a commit that referenced this pull request Jul 15, 2016
***Problem***
There is an error in the Error frame, the error codes used for `APPLICATION_ERROR`,
`REJECTED`, `CANCELED` and `INVALID` were invalid.

***Solution***
Update the constants.
I don't think it requires doing any version bump, since the error code was not used
prior to #150.

***Modification***
I also took the oportunity to review the `frame` package and update it to the Java
code style.
@robertroeser robertroeser merged commit 52a670f into master Jul 15, 2016
@stevegury stevegury deleted the stevegury/fix-exc-propagation branch July 15, 2016 22:30
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

Successfully merging this pull request may close these issues.

3 participants